1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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

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);