Module: wine Branch: master Commit: 7223330ffc15b0d824b601bb23d3e2c61258b9da URL: http://source.winehq.org/git/wine.git/?a=commit;h=7223330ffc15b0d824b601bb23...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Mon Nov 30 19:08:42 2015 +1100
kernel32: Replace NULL argument with pointer to DWORD.
On Windows, passing in NULL can cause a memory access violation.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/editline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c index db17508..78ea789 100644 --- a/dlls/kernel32/editline.c +++ b/dlls/kernel32/editline.c @@ -98,7 +98,9 @@ static void WCEL_Dump(WCEL_Context* ctx, const char* pfx)
static BOOL WCEL_Get(WCEL_Context* ctx, INPUT_RECORD* ir) { - if (ReadConsoleInputW(ctx->hConIn, ir, 1, NULL)) return TRUE; + DWORD num_read; + + if (ReadConsoleInputW(ctx->hConIn, ir, 1, &num_read)) return TRUE; ctx->error = 1; return FALSE; }