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 <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jason Edmeades 2018-07-04 22:08:40 +01:00 committed by Alexandre Julliard
parent 254dc78c2c
commit ab46a89c3b
1 changed files with 1 additions and 1 deletions

View File

@ -4923,7 +4923,7 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
LoadStringW(hinst, WCMD_NOFTYPE, msgbuffer, LoadStringW(hinst, WCMD_NOFTYPE, msgbuffer,
sizeof(msgbuffer)/sizeof(WCHAR)); sizeof(msgbuffer)/sizeof(WCHAR));
} }
WCMD_output_stderr(msgbuffer, keyValue); WCMD_output_stderr(msgbuffer, args);
errorlevel = 2; errorlevel = 2;
} }