From 31a7cad48620f392630d718c4a9ca4129d4437ab Mon Sep 17 00:00:00 2001 From: Alberto Massari Date: Thu, 19 Dec 2002 04:10:35 +0000 Subject: [PATCH] CompareStringW should return 0 when one of the provided strings is a NULL pointer. --- ole/ole2nls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ole/ole2nls.c b/ole/ole2nls.c index d288e58b541..5c274a31c98 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -1255,6 +1255,11 @@ int WINAPI CompareStringW(LCID lcid, DWORD fdwStyle, if(fdwStyle & NORM_IGNORESYMBOLS) FIXME("IGNORESYMBOLS not supported\n"); + if(s1==NULL || s2==NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } /* Is strcmp defaulting to string sort or to word sort?? */ /* FIXME: Handle NORM_STRINGSORT */ l1 = (l1==-1)?strlenW(s1):l1;