Mercurial > vim
comparison src/eval.c @ 7765:9c0d554a497e v7.4.1180
commit https://github.com/vim/vim/commit/7465c6375fd60eab603681bcad8a8744ddc31614
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 25 22:20:27 2016 +0100
patch 7.4.1180
Problem: Crash with invalid argument to glob2regpat().
Solution: Check for NULL. (Justin M. Keyes, closes https://github.com/vim/vim/issues/596) Add a test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 25 Jan 2016 22:30:05 +0100 |
parents | db5864658024 |
children | 3d8e4e0d7127 |
comparison
equal
deleted
inserted
replaced
7764:c500ad63925b | 7765:9c0d554a497e |
---|---|
12991 typval_T *rettv; | 12991 typval_T *rettv; |
12992 { | 12992 { |
12993 char_u *pat = get_tv_string_chk(&argvars[0]); | 12993 char_u *pat = get_tv_string_chk(&argvars[0]); |
12994 | 12994 |
12995 rettv->v_type = VAR_STRING; | 12995 rettv->v_type = VAR_STRING; |
12996 rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE); | 12996 rettv->vval.v_string = (pat == NULL) |
12997 ? NULL : file_pat_to_reg_pat(pat, NULL, NULL, FALSE); | |
12997 } | 12998 } |
12998 | 12999 |
12999 /* | 13000 /* |
13000 * "has()" function | 13001 * "has()" function |
13001 */ | 13002 */ |