From: Cam Sinclair Date: Fri, 25 Feb 2022 17:42:23 +0000 (+0000) Subject: patch 8.2.4466: MS-Windows: illegal memory access in installer X-Git-Tag: v8.2.4466 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c6edf41f9beffea21ce45d658822cc4c0745fdb;p=vim 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) --- diff --git a/src/dosinst.c b/src/dosinst.c index 608f381f1..e77152fdd 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -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) diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 9614f55fe..56288d78f 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -863,6 +863,7 @@ func Test_d_file() bwipe! filetype off + call delete('Xfile.d') endfunc func Test_dep3patch_file() diff --git a/src/version.c b/src/version.c index 94479e3ce..d82fff51a 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,10 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4467, +/**/ + 4466, /**/ 4465, /**/