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

patch 7.4.1180

Problem:    Crash with invalid argument to glob2regpat().
Solution:   Check for NULL. (Justin M. Keyes, closes #596)  Add a test.
This commit is contained in:
Bram Moolenaar
2016-01-25 22:20:27 +01:00
parent f4f79b84a5
commit 7465c6375f
3 changed files with 5 additions and 1 deletions

View File

@@ -12993,7 +12993,8 @@ f_glob2regpat(argvars, rettv)
char_u *pat = get_tv_string_chk(&argvars[0]);
rettv->v_type = VAR_STRING;
rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
rettv->vval.v_string = (pat == NULL)
? NULL : file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
}
/*

View File

@@ -5,6 +5,7 @@ source test_backspace_opt.vim
source test_cursor_func.vim
source test_delete.vim
source test_expand.vim
source test_glob2regpat.vim
source test_json.vim
source test_lispwords.vim
source test_menu.vim

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1180,
/**/
1179,
/**/