From 1671de3098b7ab663398dd694b314e7f67a93411 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 5 Oct 2019 21:35:16 +0200 Subject: [PATCH] patch 8.1.2116: no check for out of memory Problem: No check for out of memory. Solution: Check for NULL pointer. --- src/option.c | 9 ++++++--- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/option.c b/src/option.c index 75ff3cdb2..60c1141b6 100644 --- a/src/option.c +++ b/src/option.c @@ -112,9 +112,12 @@ set_init_1(int clean_arg) { len = STRLEN(p) + 3; // two quotes and a trailing NUL cmd = alloc(len); - vim_snprintf((char *)cmd, len, "\"%s\"", p); - set_string_default("sh", cmd); - vim_free(cmd); + if (cmd != NULL) + { + vim_snprintf((char *)cmd, len, "\"%s\"", p); + set_string_default("sh", cmd); + vim_free(cmd); + } } else set_string_default("sh", p); diff --git a/src/version.c b/src/version.c index b1bccb4f6..11bfd6844 100644 --- a/src/version.c +++ b/src/version.c @@ -753,6 +753,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2116, /**/ 2115, /**/ -- 2.50.1