]> granicus.if.org Git - php/commitdiff
Fix misleading sizeof
authorNikita Popov <nikic@php.net>
Sat, 19 Oct 2013 21:43:05 +0000 (23:43 +0200)
committerNikita Popov <nikic@php.net>
Sat, 19 Oct 2013 21:43:05 +0000 (23:43 +0200)
An array of zval* is allocated, but sizeof(zval **) is used.
Makes no practical difference as sizeof(zval *) == sizeof(zval **).

ext/standard/assert.c

index 631834c97c0f314634fcbce6edc29223da4a43e8..1a24ade79e64fd7a532f2f2e5e6cc6f1b9e07e3b 100644 (file)
@@ -200,7 +200,7 @@ PHP_FUNCTION(assert)
        }
 
        if (ASSERTG(callback)) {
-               zval **args = safe_emalloc(description_len == 0 ? 3 : 4, sizeof(zval **), 0);
+               zval **args = safe_emalloc(description_len == 0 ? 3 : 4, sizeof(zval *), 0);
                zval *retval;
                int i;
                uint lineno = zend_get_executed_lineno(TSRMLS_C);