From e7d381f7b65c1c37f3b917c4659b227eb8180e4d Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 21 May 2006 13:25:16 +0000 Subject: [PATCH] - Drop unneccesary check and change to safe_emalloc --- ext/standard/base64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) { -- 2.50.1