]> granicus.if.org Git - vim/commitdiff
patch 8.2.4466: MS-Windows: illegal memory access in installer v8.2.4466
authorCam Sinclair <csinkers@gmail.com>
Fri, 25 Feb 2022 17:42:23 +0000 (17:42 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Feb 2022 17:42:23 +0000 (17:42 +0000)
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)

src/dosinst.c
src/testdir/test_filetype.vim
src/version.c

index 608f381f12c1dc75398e62d237765e691aee515f..e77152fddd998db0982046bea7f7c5f3da9198cf 100644 (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)
index 9614f55fe3880bb27de5a539ceabbffe04620fdd..56288d78f0eb87a98f280678d0eda8dd2f6b897f 100644 (file)
@@ -863,6 +863,7 @@ func Test_d_file()
   bwipe!
 
   filetype off
+  call delete('Xfile.d')
 endfunc
 
 func Test_dep3patch_file()
index 94479e3ce58753e947f93614335f26e59cac5a67..d82fff51a32905688c9998ea1ed252ee90bf28b1 100644 (file)
@@ -754,6 +754,10 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4467,
+/**/
+    4466,
 /**/
     4465,
 /**/