1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00

Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #80002: calc free space for new interned string is wrong
This commit is contained in:
Christoph M. Becker
2020-08-24 11:04:27 +02:00

View File

@@ -493,7 +493,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str)
} while (pos != STRTAB_INVALID_POS);
}
if (UNEXPECTED(ZCSG(interned_strings).end - ZCSG(interned_strings).top < STRTAB_STR_SIZE(str))) {
if (UNEXPECTED((char*)ZCSG(interned_strings).end - (char*)ZCSG(interned_strings).top < STRTAB_STR_SIZE(str))) {
/* no memory, return the same non-interned string */
zend_accel_error(ACCEL_LOG_WARNING, "Interned string buffer overflow");
return str;