]> granicus.if.org Git - php/commitdiff
MFB: - Fix bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings)
authorfoobar <sniper@php.net>
Tue, 17 Feb 2004 22:04:05 +0000 (22:04 +0000)
committerfoobar <sniper@php.net>
Tue, 17 Feb 2004 22:04:05 +0000 (22:04 +0000)
Zend/zend_list.c

index c8676a2473b619d4a4770684220b25ce6163e37e..bd88e44c761ee43ab073a8383a41442c6d71b8d5 100644 (file)
@@ -315,7 +315,7 @@ ZEND_API int zend_fetch_list_dtor_id(char *type_name)
 
        zend_hash_internal_pointer_reset_ex(&list_destructors, &pos);
        while (zend_hash_get_current_data_ex(&list_destructors, (void **)&lde, &pos) == SUCCESS) {
-               if (strcmp(type_name, lde->type_name) == 0) {
+               if (lde->type_name && (strcmp(type_name, lde->type_name) == 0)) {
 #if 0
                        printf("Found resource id %d for resource type %s\n", (*lde).resource_id, type_name);
 #endif