Skip to content

Commit 29e5e47

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix #72595: php_output_handler_append illegal write access
2 parents 1bc5bd7 + c6b7f6c commit 29e5e47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static inline int php_output_handler_append(php_output_handler *handler, const p
897897
size_t grow_buf = PHP_OUTPUT_HANDLER_INITBUF_SIZE(buf->used - (handler->buffer.size - handler->buffer.used));
898898
size_t grow_max = MAX(grow_int, grow_buf);
899899

900-
handler->buffer.data = erealloc(handler->buffer.data, handler->buffer.size + grow_max);
900+
handler->buffer.data = safe_erealloc(handler->buffer.data, 1, handler->buffer.size, grow_max);
901901
handler->buffer.size += grow_max;
902902
}
903903
memcpy(handler->buffer.data + handler->buffer.used, buf->data, buf->used);

0 commit comments

Comments
 (0)