ext/gd: Flip size and nb arguments for safe_emalloc()

The size should be the second one
This commit is contained in:
Gina Peter Banyard 2025-04-04 15:12:06 +01:00
parent 68665d3cb5
commit bda9ff8338
No known key found for this signature in database
GPG key ID: F30F8C1ACF51943F

View file

@ -649,7 +649,7 @@ PHP_FUNCTION(imagesetstyle)
}
/* copy the style values in the stylearr */
stylearr = safe_emalloc(sizeof(int), num_styles, 0);
stylearr = safe_emalloc(num_styles, sizeof(int), 0);
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(styles), item) {
stylearr[index++] = zval_get_long(item);