diff options
Diffstat (limited to 'ext/opcache/zend_file_cache.c')
-rw-r--r-- | ext/opcache/zend_file_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 8789fb1dde..861a10b3c4 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -96,8 +96,10 @@ static int zend_file_cache_flock(int fd, int type) #define IS_SERIALIZED_INTERNED(ptr) \ ((size_t)(ptr) & Z_UL(1)) + +/* Allowing == here to account for a potential empty allocation at the end of the memory */ #define IS_SERIALIZED(ptr) \ - ((char*)(ptr) < (char*)script->size) + ((char*)(ptr) <= (char*)script->size) #define IS_UNSERIALIZED(ptr) \ (((char*)(ptr) >= (char*)script->mem && (char*)(ptr) < (char*)script->mem + script->size) || \ IS_ACCEL_INTERNED(ptr)) |