diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index febe38aa9254a..f0e3b69ae5fb3 100644 --- a/ext/opcache/zend_accelerator_blacklist.c +++ b/ext/opcache/zend_accelerator_blacklist.c @@ -276,12 +276,12 @@ static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filena } /* strip \" */ - if (pbuf[0] == '\"' && pbuf[path_length - 1]== '\"') { + if (path_length > 0 && pbuf[0] == '\"' && pbuf[path_length - 1]== '\"') { *pbuf++ = 0; path_length -= 2; } - if (path_length == 0) { + if (path_length <= 0) { continue; }