From 43dfe7637670d51ddab43c487e772109b7708fc8 Mon Sep 17 00:00:00 2001 From: Thomas Faller Date: Thu, 11 Jun 2015 22:14:11 +0200 Subject: [PATCH] cmd: Fix access of uninitialized memory. --- programs/cmd/builtins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 724da2073fa..30b86844619 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -3313,7 +3313,8 @@ void WCMD_setshow_default (const WCHAR *args) { WINE_TRACE("Request change to directory '%s'\n", wine_dbgstr_w(args)); /* Skip /D and trailing whitespace if on the front of the command line */ - if (CompareStringW(LOCALE_USER_DEFAULT, + if (strlenW(args) >= 2 && + CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, args, 2, parmD, -1) == CSTR_EQUAL) { args += 2;