Skip to content

Commit bda9ff8

Browse files
committed
ext/gd: Flip size and nb arguments for safe_emalloc()
The size should be the second one
1 parent 68665d3 commit bda9ff8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gd/gd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ PHP_FUNCTION(imagesetstyle)
649649
}
650650

651651
/* copy the style values in the stylearr */
652-
stylearr = safe_emalloc(sizeof(int), num_styles, 0);
652+
stylearr = safe_emalloc(num_styles, sizeof(int), 0);
653653

654654
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(styles), item) {
655655
stylearr[index++] = zval_get_long(item);

0 commit comments

Comments
 (0)