From 58bb61cf5ee008254eb331bc3574eac87d2dcc4a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 10 Jul 2020 20:30:12 +0200 Subject: [PATCH] patch 8.2.1171: possible crash when out of memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem: Possible crash when out of memory. Solution: Check for NULL pointer. (Dominique Pellé, closes #6432) --- src/syntax.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/syntax.c b/src/syntax.c index 6bbe4bacc..ccdb2030c 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -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) diff --git a/src/version.c b/src/version.c index 73d456001..c13f7f18f 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1171, /**/ 1170, /**/ -- 2.50.1