# HG changeset patch # User Bram Moolenaar # Date 1570304704 -7200 # Node ID 463da858674971177e0fae3411b5346086392939 # Parent 0d7e8480d1c5bd5bcfdc1f1b15be66767b09c543 patch 8.1.2116: no check for out of memory Commit: https://github.com/vim/vim/commit/1671de3098b7ab663398dd694b314e7f67a93411 Author: Bram Moolenaar Date: Sat Oct 5 21:35:16 2019 +0200 patch 8.1.2116: no check for out of memory Problem: No check for out of memory. Solution: Check for NULL pointer. diff --git a/src/option.c b/src/option.c --- 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 --- 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 */ /**/ + 2116, +/**/ 2115, /**/ 2114,