Commit f3b8ccb2 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

conhost: Improve bound checking in fill_output.

Inspired by Pengpeng Dong's patch. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ebe3fe53
......@@ -2168,9 +2168,9 @@ static NTSTATUS fill_output( struct screen_buffer *screen_buffer, const struct c
TRACE( "(%u %u) mode %u\n", params->x, params->y, params->mode );
dest = screen_buffer->data + params->y * screen_buffer->width + params->x;
if (params->y >= screen_buffer->height) return STATUS_SUCCESS;
dest = screen_buffer->data + min( params->y * screen_buffer->width + params->x,
screen_buffer->height * screen_buffer->width );
if (params->wrap)
end = screen_buffer->data + screen_buffer->height * screen_buffer->width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment