From bda9ff8338c6394e23b9b60d0f104c2553e2f5a7 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Fri, 4 Apr 2025 15:12:06 +0100 Subject: [PATCH] ext/gd: Flip size and nb arguments for safe_emalloc() The size should be the second one --- ext/gd/gd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5822c368e3d..688658b2899 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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);