0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.2.4466: MS-Windows: illegal memory access in installer

Problem:    MS-Windows: illegal memory access in installer when using
            "create-directories" as the final argument.
Solution:   Check the argument count. (Cam Sinclair, closes #9844)
This commit is contained in:
Cam Sinclair 2022-02-25 17:42:23 +00:00 committed by Bram Moolenaar
parent 5ec633b9b0
commit 5c6edf41f9
3 changed files with 6 additions and 1 deletions

View File

@ -2495,7 +2495,7 @@ command_line_setup_choices(int argc, char **argv)
int vimfiles_dir_choice = (int)vimfiles_dir_none;
init_directories_choice();
if (argv[i + 1][0] != '-')
if (i + 1 < argc && argv[i + 1][0] != '-')
{
i++;
if (strcmp(argv[i], "vim") == 0)

View File

@ -863,6 +863,7 @@ func Test_d_file()
bwipe!
filetype off
call delete('Xfile.d')
endfunc
func Test_dep3patch_file()

View File

@ -754,6 +754,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4467,
/**/
4466,
/**/
4465,
/**/