Thomas Faller : cmd: Fix access of uninitialized memory.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jun 12 07:36:13 CDT 2015
Module: wine
Branch: master
Commit: 43dfe7637670d51ddab43c487e772109b7708fc8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=43dfe7637670d51ddab43c487e772109b7708fc8
Author: Thomas Faller <tfaller1 at gmx.de>
Date: Thu Jun 11 22:14:11 2015 +0200
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 724da20..30b8684 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;
More information about the wine-cvs
mailing list