Problem: No check for out of memory.
Solution: Check for NULL pointer.
{
len = STRLEN(p) + 3; // two quotes and a trailing NUL
cmd = alloc(len);
- vim_snprintf((char *)cmd, len, "\"%s\"", p);
- set_string_default("sh", cmd);
- vim_free(cmd);
+ if (cmd != NULL)
+ {
+ vim_snprintf((char *)cmd, len, "\"%s\"", p);
+ set_string_default("sh", cmd);
+ vim_free(cmd);
+ }
}
else
set_string_default("sh", p);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2116,
/**/
2115,
/**/