Skip to content

Commit 74d177b

Browse files
committed
ext/gd: imagesetstyle() styles list argument overflow check removal.
Accept up to UINT_MAX * sizeof(int) styles.
1 parent aa0c54d commit 74d177b

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
@@ -648,7 +648,7 @@ PHP_FUNCTION(imagesetstyle)
648648
}
649649

650650
/* copy the style values in the stylearr */
651-
stylearr = safe_emalloc(num_styles, sizeof(int), 0);
651+
stylearr = emalloc(num_styles * sizeof(int));
652652

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

0 commit comments

Comments
 (0)