]> granicus.if.org Git - php/commitdiff
- Drop unneccesary check and change to safe_emalloc
authorMarcus Boerger <helly@php.net>
Sun, 21 May 2006 13:25:16 +0000 (13:25 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 21 May 2006 13:25:16 +0000 (13:25 +0000)
ext/standard/base64.c

index 5205ed9378bd3822706577ec621270f3be9c23d2..366008e07e85f7e23fa4129b0b2419ff4c8edf70 100644 (file)
@@ -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) {