]> granicus.if.org Git - php/commitdiff
fix uninitialized memory usage
authorAnatol Belski <ab@php.net>
Sun, 14 Jul 2013 18:44:29 +0000 (20:44 +0200)
committerAnatol Belski <ab@php.net>
Sun, 14 Jul 2013 18:44:29 +0000 (20:44 +0200)
ext/standard/array.c

index 40a27c053629c34e7e28cc477e891e8712623db4..9b02575276544fc19f879572007437c2aa5141f4 100644 (file)
@@ -1053,7 +1053,7 @@ PHP_FUNCTION(max)
 static int php_array_walk(HashTable *target_hash, zval *userdata, int recursive TSRMLS_DC) /* {{{ */
 {
        zval **args[3],                 /* Arguments to userland function */
-                 *retval_ptr,          /* Return value - unused */
+                 *retval_ptr = NULL,           /* Return value - unused */
                  *key=NULL;            /* Entry key */
        char  *string_key;
        uint   string_key_len;
@@ -2877,7 +2877,7 @@ static int zval_compare(zval **a, zval **b TSRMLS_DC) /* {{{ */
 static int zval_user_compare(zval **a, zval **b TSRMLS_DC) /* {{{ */
 {
        zval **args[2];
-       zval *retval_ptr;
+       zval *retval_ptr = NULL;
 
        args[0] = (zval **) a;
        args[1] = (zval **) b;