Jacek Caban : conhost: Clear out_size in IOCTL_CONDRV_READ_CONSOLE implementation.
Alexandre Julliard
julliard at winehq.org
Thu Oct 1 15:50:31 CDT 2020
Module: wine
Branch: master
Commit: c9e1b789d285fc43c1d8142eb8b4f2fe969c6c45
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c9e1b789d285fc43c1d8142eb8b4f2fe969c6c45
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Oct 1 15:08:50 2020 +0200
conhost: Clear out_size in IOCTL_CONDRV_READ_CONSOLE implementation.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/conhost/conhost.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c
index 86a400307d..ac0e22b4c4 100644
--- a/programs/conhost/conhost.c
+++ b/programs/conhost/conhost.c
@@ -2425,6 +2425,8 @@ static NTSTATUS screen_buffer_ioctl( struct screen_buffer *screen_buffer, unsign
static NTSTATUS console_input_ioctl( struct console *console, unsigned int code, const void *in_data,
size_t in_size, size_t *out_size )
{
+ NTSTATUS status;
+
switch (code)
{
case IOCTL_CONDRV_GET_MODE:
@@ -2446,12 +2448,13 @@ static NTSTATUS console_input_ioctl( struct console *console, unsigned int code,
case IOCTL_CONDRV_READ_CONSOLE:
if (in_size || *out_size % sizeof(WCHAR)) return STATUS_INVALID_PARAMETER;
ensure_tty_input_thread( console );
- return read_console( console, *out_size );
+ status = read_console( console, *out_size );
+ *out_size = 0;
+ return status;
case IOCTL_CONDRV_READ_INPUT:
{
unsigned int blocking;
- NTSTATUS status;
if (in_size && in_size != sizeof(blocking)) return STATUS_INVALID_PARAMETER;
ensure_tty_input_thread( console );
blocking = in_size && *(unsigned int *)in_data;
More information about the wine-cvs
mailing list