# HG changeset patch # User Bram Moolenaar # Date 1553033704 -3600 # Node ID 27f9f4c1400be820a2e674e21494f53734d31d34 # Parent 145ee92315f6affc9c089a99aa957e79bb1c0092 patch 8.1.1022: may use NULL pointer when out of memory commit https://github.com/vim/vim/commit/e142a9467a7f6845a426d8db6efedf246d3c13ac Author: Bram Moolenaar Date: Tue Mar 19 23:03:27 2019 +0100 patch 8.1.1022: may use NULL pointer when out of memory Problem: May use NULL pointer when out of memory. (Coverity) Solution: Check for blob_alloc() returning NULL. diff --git a/src/blob.c b/src/blob.c --- a/src/blob.c +++ b/src/blob.c @@ -232,6 +232,8 @@ string2blob(char_u *str) blob_T *blob = blob_alloc(); char_u *s = str; + if (blob == NULL) + return NULL; if (s[0] != '0' || (s[1] != 'z' && s[1] != 'Z')) goto failed; s += 2; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -780,6 +780,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1022, +/**/ 1021, /**/ 1020,