mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1171: possible crash when out of memory
Problem: Possible crash when out of memory. Solution: Check for NULL pointer. (Dominique Pellé, closes #6432)
This commit is contained in:
@@ -5764,6 +5764,8 @@ syn_cmd_sync(exarg_T *eap, int syncing UNUSED)
|
||||
next_arg = skipwhite(arg_end);
|
||||
vim_free(key);
|
||||
key = vim_strnsave_up(arg_start, arg_end - arg_start);
|
||||
if (key == NULL)
|
||||
break;
|
||||
if (STRCMP(key, "CCOMMENT") == 0)
|
||||
{
|
||||
if (!eap->skip)
|
||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1171,
|
||||
/**/
|
||||
1170,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user