]> granicus.if.org Git - php/commitdiff
zend_hash_del didn't check the PACKED flag
authorXinchen Hui <laruence@gmail.com>
Wed, 19 Feb 2014 11:26:43 +0000 (19:26 +0800)
committerXinchen Hui <laruence@gmail.com>
Wed, 19 Feb 2014 11:27:42 +0000 (19:27 +0800)
Zend/zend_hash.c

index e1dd96c569594cdcf8e09260ddd16a82c6b6c106..1b6b6e0678a6280f3aadf711bed0612a7ef8d1e4 100644 (file)
@@ -550,6 +550,10 @@ ZEND_API int zend_hash_del(HashTable *ht, zend_string *key)
 
        IS_CONSISTENT(ht);
 
+       if (ht->flags & HASH_FLAG_PACKED) {
+               return FAILURE;
+       }
+
        h = STR_HASH_VAL(key);
        nIndex = h & ht->nTableMask;