[PATCH] remove strange condition which might lead to crash

Marcus Meissner marcus at jet.franken.de
Thu Jan 10 02:49:47 CST 2008


Hi,

Coverity spotted "arg" as potentially NULL dereferenced
and the originating condition looks broken to me.

It should not really handle "delim", but just check arg.

Ciao, Marcus
---
 dlls/msvcrt/process.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c
index ee044aa..13573e6 100644
--- a/dlls/msvcrt/process.c
+++ b/dlls/msvcrt/process.c
@@ -233,7 +233,7 @@ static MSVCRT_wchar_t *msvcrt_argvtos_aw(const char * const *arg, MSVCRT_wchar_t
   unsigned long len;
   MSVCRT_wchar_t *p, *ret;
 
-  if (!arg && !delim)
+  if (!arg)
   {
       /* Return NULL for an empty environment list */
       return NULL;
-- 
1.5.2.4



More information about the wine-patches mailing list