Commit b9f1ec8c authored by Pengpeng Dong's avatar Pengpeng Dong Committed by Alexandre Julliard

conhost: Validate width param in write_output.

parent d22e8219
......@@ -1984,6 +1984,8 @@ static NTSTATUS write_output( struct screen_buffer *screen_buffer, const struct
char_info_t *dest;
char *src;
if (*out_size == sizeof(SMALL_RECT) && !params->width) return STATUS_INVALID_PARAMETER;
entry_size = params->mode == CHAR_INFO_MODE_TEXTATTR ? sizeof(char_info_t) : sizeof(WCHAR);
entry_cnt = (in_size - sizeof(*params)) / entry_size;
......
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