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)
diff --git a/src/syntax.c b/src/syntax.c
index 6bbe4ba..ccdb203 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5764,6 +5764,8 @@
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)
diff --git a/src/version.c b/src/version.c
index 73d4560..c13f7f1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1171,
+/**/
1170,
/**/
1169,