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:
parent
ef85a9b2d9
commit
58bb61cf5e
@ -5764,6 +5764,8 @@ syn_cmd_sync(exarg_T *eap, int syncing UNUSED)
|
|||||||
next_arg = skipwhite(arg_end);
|
next_arg = skipwhite(arg_end);
|
||||||
vim_free(key);
|
vim_free(key);
|
||||||
key = vim_strnsave_up(arg_start, arg_end - arg_start);
|
key = vim_strnsave_up(arg_start, arg_end - arg_start);
|
||||||
|
if (key == NULL)
|
||||||
|
break;
|
||||||
if (STRCMP(key, "CCOMMENT") == 0)
|
if (STRCMP(key, "CCOMMENT") == 0)
|
||||||
{
|
{
|
||||||
if (!eap->skip)
|
if (!eap->skip)
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1171,
|
||||||
/**/
|
/**/
|
||||||
1170,
|
1170,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user