From: Marcus Boerger Date: Sun, 21 May 2006 13:25:16 +0000 (+0000) Subject: - Drop unneccesary check and change to safe_emalloc X-Git-Tag: BEFORE_NEW_OUTPUT_API~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7d381f7b65c1c37f3b917c4659b227eb8180e4d;p=php - Drop unneccesary check and change to safe_emalloc --- diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 5205ed9378..366008e07e 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -144,10 +144,7 @@ PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, in /* this sucks for threaded environments */ unsigned char *result; - result = (unsigned char *)emalloc(length + 1); - if (result == NULL) { - return NULL; - } + result = (unsigned char *)safe_emalloc(length, 1, 1); /* run through the whole string, converting as we go */ while ((ch = *current++) != '\0' && length-- > 0) {