diff options
Diffstat (limited to 'ext/standard/var_unserializer.re')
-rw-r--r-- | ext/standard/var_unserializer.re | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index bb0000ba5f..1707ca5cc1 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -410,13 +410,12 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long static inline int finish_nested_data(UNSERIALIZE_PARAMETER) { - if (*((*p)++) == '}') - return 1; + if (*p >= max || **p != '}') { + return 0; + } -#if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE - zval_ptr_dtor(rval); -#endif - return 0; + (*p)++; + return 1; } static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) |