File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ shortpath_for_invalid_fname(
105
105
char_u * * bufp ,
106
106
size_t * fnamelen )
107
107
{
108
- char_u * short_fname , * save_fname , * pbuf_unused ;
108
+ char_u * save_fname ;
109
+ char_u * pbuf_unused = NULL ;
110
+ char_u * short_fname = NULL ;
109
111
char_u * endp , * save_endp ;
110
112
char_u ch ;
111
113
size_t old_len ;
@@ -116,8 +118,11 @@ shortpath_for_invalid_fname(
116
118
// Make a copy
117
119
old_len = * fnamelen ;
118
120
save_fname = vim_strnsave (* fname , old_len );
119
- pbuf_unused = NULL ;
120
- short_fname = NULL ;
121
+ if (save_fname == NULL )
122
+ {
123
+ retval = FAIL ;
124
+ goto theend ;
125
+ }
121
126
122
127
endp = save_fname + old_len - 1 ; // Find the end of the copy
123
128
save_endp = endp ;
@@ -233,6 +238,8 @@ shortpath_for_partial(
233
238
pbuf = tfname = expand_env_save (* fnamep );
234
239
else
235
240
pbuf = tfname = FullName_save (* fnamep , FALSE);
241
+ if (tfname == NULL )
242
+ return FAIL ;
236
243
237
244
len = tflen = STRLEN (tfname );
238
245
Original file line number Diff line number Diff line change @@ -704,6 +704,8 @@ static char *(features[]) =
704
704
705
705
static int included_patches [] =
706
706
{ /* Add new patch number below this line */
707
+ /**/
708
+ 1218 ,
707
709
/**/
708
710
1217 ,
709
711
/**/
You can’t perform that action at this time.
0 commit comments