1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

Merge branch 'PHP-8.1'

* PHP-8.1:
  Fix GH-9033: Loading blacklist file can fail due to negative length
This commit is contained in:
Christoph M. Becker
2022-07-25 16:33:15 +02:00

View File

@@ -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;
}