From da55120b84cb3e43fc35a8815b5cfb61897aab6d Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 19 Jun 2003 15:48:09 +0000 Subject: [PATCH] MFH: Fixed a crash inside php_imagettftext_common(); --- ext/gd/gd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.50.1