From: Ilia Alshanetsky Date: Thu, 19 Jun 2003 15:48:09 +0000 (+0000) Subject: MFH: Fixed a crash inside php_imagettftext_common(); X-Git-Tag: php-4.3.3RC2~275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da55120b84cb3e43fc35a8815b5cfb61897aab6d;p=php MFH: Fixed a crash inside php_imagettftext_common(); --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d4bb5b5402..ffe401387d 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3012,8 +3012,9 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int do { zval ** item; char * key; + ulong num_key; - if (zend_hash_get_current_key_ex(HASH_OF(*EXT), &key, NULL, NULL, 0, &pos) == FAILURE) + if (zend_hash_get_current_key_ex(HASH_OF(*EXT), &key, NULL, &num_key, 0, &pos) != HASH_KEY_IS_STRING) continue; if (zend_hash_get_current_data_ex(HASH_OF(*EXT), (void**)&item, &pos) == FAILURE)