Skip to content

Commit aeadf9b

Browse files
author
Ilia Alshanetsky
committed
Fixed a crash inside php_imagettftext_common();
1 parent e52b96a commit aeadf9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/gd/gd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3107,8 +3107,9 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
31073107
do {
31083108
zval ** item;
31093109
char * key;
3110+
ulong num_key;
31103111

3111-
if (zend_hash_get_current_key_ex(HASH_OF(*EXT), &key, NULL, NULL, 0, &pos) == FAILURE) {
3112+
if (zend_hash_get_current_key_ex(HASH_OF(*EXT), &key, NULL, &num_key, 0, &pos) != HASH_KEY_IS_STRING) {
31123113
continue;
31133114
}
31143115

0 commit comments

Comments
 (0)