changeset 2766:415c55534d90 v7.3.159

updated for version 7.3.159 Problem: Using uninitialized pointer when out of memory. Solution: Check for NULL return value.
author Bram Moolenaar <bram@vim.org>
date Mon, 11 Apr 2011 14:29:17 +0200
parents 27a73cdbdb10
children 9d6d058f0ebb
files src/mbyte.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }
--- 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,