summaryrefslogtreecommitdiffstats
path: root/src/dosinst.c
diff options
context:
space:
mode:
authorCam Sinclair <csinkers@gmail.com>2022-02-25 17:42:23 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-25 17:42:23 +0000
commit5c6edf41f9beffea21ce45d658822cc4c0745fdb (patch)
treec5f2c4400cd8ee1a5aa792439c8680b6881beff1 /src/dosinst.c
parent5ec633b9b0400519db60253cb5846e50394218b4 (diff)
patch 8.2.4466: MS-Windows: illegal memory access in installerv8.2.4466
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)
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c2
1 files changed, 1 insertions, 1 deletions
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)