0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -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:
Bram Moolenaar 2020-07-10 20:30:12 +02:00
parent ef85a9b2d9
commit 58bb61cf5e
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1171,
/**/
1170,
/**/