From ab46a89c3b8649844a70ee30abffbbd275128bc3 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Wed, 4 Jul 2018 22:08:40 +0100 Subject: [PATCH] cmd: Fix issue in WCMD_assoc highlighted by valgrind. In an error condition, the wrong variable was being used for an insert, resulting in a read from uninitialized data. This could be triggered for example by 'ftype jason=', and the error message should have included jason but instead was just ''. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38849 Signed-off-by: Jason Edmeades Signed-off-by: Alexandre Julliard --- programs/cmd/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 3a0981d2228..57a41c47523 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -4923,7 +4923,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) { LoadStringW(hinst, WCMD_NOFTYPE, msgbuffer, sizeof(msgbuffer)/sizeof(WCHAR)); } - WCMD_output_stderr(msgbuffer, keyValue); + WCMD_output_stderr(msgbuffer, args); errorlevel = 2; }