wcmd: Don't crash if command is NULL
Juan Lang
juan.lang at gmail.com
Wed Aug 12 19:44:50 CDT 2009
Fixes bug 19407.
--Juan
-------------- next part --------------
From cb3d8b030c9873f678fb0d03e8619d2edcf863d9 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Wed, 12 Aug 2009 17:38:40 -0700
Subject: [PATCH 11/11] Don't crash if command is NULL
---
programs/cmd/wcmdmain.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index d3aea6d..1791953 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1214,6 +1214,8 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
wine_dbgstr_w(command), cmdList,
wine_dbgstr_w(forVariable), wine_dbgstr_w(forValue));
+ if (!command) return;
+
/* If the next command is a pipe then we implement pipes by redirecting
the output from this command to a temp file and input into the
next command from that temp file.
--
1.6.3.2
More information about the wine-patches
mailing list