diff options
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -10,7 +10,7 @@ PHP NEWS . Fixed bug #72135 (Integer Overflow in php_html_entities). (Stas) - GD: - . Fixed bug ##72227 (imagescale out-of-bounds read). (Stas) + . Fixed bug #72227 (imagescale out-of-bounds read). (Stas) - Intl: . Fixed bug #72241 (get_icu_value_internal out-of-bounds read). (Stas) diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index a017498383..0961c08048 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1070,12 +1070,12 @@ gdImagePtr gdImageScaleTwoPass(const gdImagePtr src, const unsigned int src_widt dst = gdImageCreateTrueColor(new_width, new_height); if (dst == NULL) { - gdFree(tmp_im); + gdImageDestroy(tmp_im); return NULL; } gdImageSetInterpolationMethod(dst, src->interpolation_id); _gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height); - gdFree(tmp_im); + gdImageDestroy(tmp_im); return dst; } @@ -1093,7 +1093,7 @@ gdImagePtr Scale(const gdImagePtr src, const unsigned int src_width, const unsig _gdScaleHoriz(src, src_width, src_height, tmp_im, new_width, src_height); _gdScaleVert(tmp_im, new_width, src_height, dst, new_width, new_height); - gdFree(tmp_im); + gdImageDestroy(tmp_im); return dst; } |
