Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #72595: php_output_handler_append illegal write access
This commit is contained in:
Christoph M. Becker 2021-07-15 15:31:39 +02:00
commit 29e5e4719c
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6

View File

@ -897,7 +897,7 @@ static inline int php_output_handler_append(php_output_handler *handler, const p
size_t grow_buf = PHP_OUTPUT_HANDLER_INITBUF_SIZE(buf->used - (handler->buffer.size - handler->buffer.used));
size_t grow_max = MAX(grow_int, grow_buf);
handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size + grow_max);
handler->buffer.data = safe_erealloc(handler->buffer.data, 1, handler->buffer.size, grow_max);
handler->buffer.size += grow_max;
}
memcpy(handler->buffer.data + handler->buffer.used, buf->data, buf->used);