1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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

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);