Skip to content

Commit df85c25

Browse files
committed
Follow-up fix for GH-13082
The font_obj should actually be NULL initialised, not the font gd pointer. Closes GH-13139.
1 parent 5a988d5 commit df85c25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ext/gd/gd.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -2749,9 +2749,8 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
27492749
gdImagePtr im;
27502750
int ch = 0, col, x, y, i, l = 0;
27512751
unsigned char *str = NULL;
2752-
zend_object *font_obj;
2752+
zend_object *font_obj = NULL;
27532753
zend_long font_int = 0;
2754-
gdFontPtr font = NULL;
27552754

27562755
ZEND_PARSE_PARAMETERS_START(6, 6)
27572756
Z_PARAM_OBJECT_OF_CLASS(IM, gd_image_ce)
@@ -2776,7 +2775,7 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
27762775
y = Y;
27772776
x = X;
27782777

2779-
font = php_find_gd_font(font_obj, font_int);
2778+
gdFontPtr font = php_find_gd_font(font_obj, font_int);
27802779

27812780
switch (mode) {
27822781
case 0:

0 commit comments

Comments
 (0)