From 5c6edf41f9beffea21ce45d658822cc4c0745fdb Mon Sep 17 00:00:00 2001 From: Cam Sinclair Date: Fri, 25 Feb 2022 17:42:23 +0000 Subject: 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) --- src/dosinst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dosinst.c') diff --git a/src/dosinst.c b/src/dosinst.c index 608f381f12..e77152fddd 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) -- cgit v1.2.3