]> granicus.if.org Git - php/commitdiff
MFH: Fixed a crash inside php_imagettftext_common();
authorIlia Alshanetsky <iliaa@php.net>
Thu, 19 Jun 2003 15:48:09 +0000 (15:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 19 Jun 2003 15:48:09 +0000 (15:48 +0000)
ext/gd/gd.c

index d4bb5b540237b7728aa3df94c1b44838af22bb24..ffe401387db9ece6ed78b31cbff0aacd02fd805c 100644 (file)
@@ -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)