Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
- index bb0a2ff..5cd1b0b 100644
- --- a/Zend/zend_hash.c
- +++ b/Zend/zend_hash.c
- @@ -71,7 +71,7 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
- #define HASH_PROTECT_RECURSION(ht)
- \
- if ((ht)->u.flags & HASH_FLAG_APPLY_PROTECTION) {
- \
- - if ((ht)->u.flags >= (3 << 8)) {
- \
- + if (((ht)->u.flags & ZEND_HASH_APPLY_COUNT_MASK) >= (3 << 8)) {
- \
- zend_error_noreturn(E_ERROR, "Nesting level too deep - recursive dependency?");\
- }
- \
- ZEND_HASH_INC_APPLY_COUNT(ht);
- \
- diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
- index 78a04ce..3ae3e45 100644
- --- a/Zend/zend_hash.h
- +++ b/Zend/zend_hash.h
- @@ -845,8 +845,9 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
- #define ZEND_HASH_APPLY_PROTECTION(ht) \
- ((ht)->u.flags & HASH_FLAG_APPLY_PROTECTION)
- -#define ZEND_HASH_APPLY_SHIFT 8
- -#define ZEND_HASH_GET_APPLY_COUNT(ht) ((ht)->u.flags >> ZEND_HASH_APPLY_SHIFT)
- +#define ZEND_HASH_APPLY_SHIFT 8
- +#define ZEND_HASH_APPLY_COUNT_MASK 0xff00
- +#define ZEND_HASH_GET_APPLY_COUNT(ht) (((ht)->u.flags & ZEND_HASH_APPLY_COUNT_MASK) >> ZEND_HASH_APPLY_SHIFT)
- #define ZEND_HASH_INC_APPLY_COUNT(ht) ((ht)->u.flags += (1 << ZEND_HASH_APPLY_SHIFT))
- #define ZEND_HASH_DEC_APPLY_COUNT(ht) ((ht)->u.flags -= (1 << ZEND_HASH_APPLY_SHIFT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement