changeset 27881:e3014ada45a5 v8.2.4466

patch 8.2.4466: MS-Windows: illegal memory access in installer Commit: https://github.com/vim/vim/commit/5c6edf41f9beffea21ce45d658822cc4c0745fdb Author: Cam Sinclair <csinkers@gmail.com> Date: Fri Feb 25 17:42:23 2022 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Fri, 25 Feb 2022 18:45:02 +0100
parents e0715aa9f9a8
children ee0155d5dfd8
files src/dosinst.c src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -2495,7 +2495,7 @@ command_line_setup_choices(int argc, cha
 	    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)
--- 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()
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,10 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4467,
+/**/
+    4466,
+/**/
     4465,
 /**/
     4464,