summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cmdexpand.c12
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 210b5f9819..b5da922fd1 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -2327,7 +2327,7 @@ expand_shellcmd(
char_u *path = NULL;
int mustfree = FALSE;
garray_T ga;
- char_u *buf = alloc(MAXPATHL);
+ char_u *buf;
size_t l;
char_u *s, *e;
int flags = flagsarg;
@@ -2337,12 +2337,18 @@ expand_shellcmd(
hashitem_T *hi;
hash_T hash;
+ buf = alloc(MAXPATHL);
if (buf == NULL)
return FAIL;
- // for ":set path=" and ":set tags=" halve backslashes for escaped
- // space
+ // for ":set path=" and ":set tags=" halve backslashes for escaped space
pat = vim_strsave(filepat);
+ if (pat == NULL)
+ {
+ vim_free(buf);
+ return FAIL;
+ }
+
for (i = 0; pat[i]; ++i)
if (pat[i] == '\\' && pat[i + 1] == ' ')
STRMOVE(pat + i, pat + i + 1);
diff --git a/src/version.c b/src/version.c
index c466c29b24..8322eb31de 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 99,
+/**/
98,
/**/
97,