Mercurial > vim
comparison src/mbyte.c @ 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 | fb60c9f35517 |
children | 0bef86c5c985 |
comparison
equal
deleted
inserted
replaced
2765:27a73cdbdb10 | 2766:415c55534d90 |
---|---|
4127 } | 4127 } |
4128 /* Not enough room or skipping illegal sequence. */ | 4128 /* Not enough room or skipping illegal sequence. */ |
4129 done = to - (char *)result; | 4129 done = to - (char *)result; |
4130 } | 4130 } |
4131 | 4131 |
4132 if (resultlenp != NULL) | 4132 if (resultlenp != NULL && result != NULL) |
4133 *resultlenp = (int)(to - (char *)result); | 4133 *resultlenp = (int)(to - (char *)result); |
4134 return result; | 4134 return result; |
4135 } | 4135 } |
4136 | 4136 |
4137 # if defined(DYNAMIC_ICONV) || defined(PROTO) | 4137 # if defined(DYNAMIC_ICONV) || defined(PROTO) |