# HG changeset patch # User Bram Moolenaar # Date 1594406704 -7200 # Node ID e35955a787a89c0574c83dd37b371d651f5915d8 # Parent bc30efb26e7d8ea999c1b280cd962f465be71ba0 patch 8.2.1171: possible crash when out of memory Commit: https://github.com/vim/vim/commit/58bb61cf5ee008254eb331bc3574eac87d2dcc4a Author: Bram Moolenaar Date: Fri Jul 10 20:30:12 2020 +0200 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 https://github.com/vim/vim/issues/6432) diff --git a/src/syntax.c b/src/syntax.c --- a/src/syntax.c +++ b/src/syntax.c @@ -5764,6 +5764,8 @@ syn_cmd_sync(exarg_T *eap, int syncing U 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 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1171, +/**/ 1170, /**/ 1169,