We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25f4f79 commit 2e7df9eCopy full SHA for 2e7df9e
ext/gd/gd.c
@@ -3599,7 +3599,7 @@ static void php_image_filter_scatter(INTERNAL_FUNCTION_PARAMETERS)
3599
RETURN_BOOL(gdImageScatter(im, (int)scatter_sub, (int)scatter_plus));
3600
}
3601
3602
- colors = emalloc(num_colors * sizeof(int));
+ colors = safe_emalloc(num_colors, sizeof(int), 0);
3603
3604
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(hash_colors), color) {
3605
*(colors + i++) = (int) zval_get_long(color);
0 commit comments