Shlwapi UNC problems with IE6 (fwd, try again)

lawson_whitney at juno.com lawson_whitney at juno.com
Sun Feb 24 19:11:08 CST 2002


---------- Forwarded message ----------
Date: Thu, 21 Feb 2002 05:41:27 +0100 (CET)
From: Sylvain Petreolle <spetreolle at yahoo.fr>
Reply-To: wine-users at winehq.com
1305	BOOL WINAPI PathIsUNCServerShareA(
1306		LPCSTR lpszPath)
1307	{
1308		TRACE("%s\n", debugstr_a(lpszPath));
1309		if (!lpszPath) return FALSE;
1310		if (lpszPath[0]=='\\' && lpszPath[1]=='\\')		
Wine-dbg>info local
PathIsUNCServerShareA:
char* lpszPath == 0x00000001

Oops, that wasn't a null pointer after all.  The app gets a bit further
with this:

ChangeLog:
	dlls/shlwapi/path.c:
	Lawson Whitney <lawson_whitney at juno.com>
	Protect PathIsUNCServerShare from bad lpszPath.

diff -ur was/dlls/shlwapi/path.c is/dlls/shlwapi/path.c
--- was/dlls/shlwapi/path.c	Wed Feb 20 17:49:34 2002
+++ is/dlls/shlwapi/path.c	Thu Feb 21 10:40:38 2002
@@ -1305,7 +1305,7 @@
 	LPCSTR lpszPath)
 {
 	TRACE("%s\n", debugstr_a(lpszPath));
-	if (!lpszPath) return FALSE;
+	if (IsBadStringPtrA(lpszPath, -1)) return FALSE;
 	if (lpszPath[0]=='\\' && lpszPath[1]=='\\')		
 	{
 	  int foundbackslash = 0;
@@ -1328,7 +1328,7 @@
 	LPCWSTR lpszPath)
 {
 	TRACE("%s\n", debugstr_w(lpszPath));
-	if (!lpszPath) return FALSE;
+	if (IsBadStringPtrW(lpszPath, -1)) return FALSE;
 	if (lpszPath[0]=='\\' && lpszPath[1]=='\\')		
 	{
 	  int foundbackslash = 0;





________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.




More information about the wine-patches mailing list