# HG changeset patch # User Bram Moolenaar # Date 1302524957 -7200 # Node ID 415c55534d901aa4617bf584462faf0c7198e07e # Parent 27a73cdbdb1094c8af4248ed99bf58d20ef3fe4a updated for version 7.3.159 Problem: Using uninitialized pointer when out of memory. Solution: Check for NULL return value. diff --git a/src/mbyte.c b/src/mbyte.c --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4129,7 +4129,7 @@ iconv_string(vcp, str, slen, unconvlenp, done = to - (char *)result; } - if (resultlenp != NULL) + if (resultlenp != NULL && result != NULL) *resultlenp = (int)(to - (char *)result); return result; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 159, +/**/ 158, /**/ 157,