0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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)
This commit is contained in:
Cam Sinclair
2022-02-25 17:42:23 +00:00
committed by Bram Moolenaar
parent 5ec633b9b0
commit 5c6edf41f9
3 changed files with 6 additions and 1 deletions

View 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)