Jacek Caban : urlmon: Make file protocol invalid URL handling behave like IE7.
Alexandre Julliard
julliard at winehq.org
Thu Jun 26 06:48:20 CDT 2008
Module: wine
Branch: master
Commit: c42d937402214d4d7a744ba36f18898e0b3a78ab
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c42d937402214d4d7a744ba36f18898e0b3a78ab
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Jun 25 19:34:59 2008 -0500
urlmon: Make file protocol invalid URL handling behave like IE7.
---
dlls/urlmon/file.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c
index d3004ac..dda1dd0 100644
--- a/dlls/urlmon/file.c
+++ b/dlls/urlmon/file.c
@@ -109,6 +109,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
pOIBindInfo, grfPI, dwReserved);
+ if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
+ || memcmp(szUrl, wszFile, sizeof(wszFile)))
+ return E_INVALIDARG;
+
memset(&bindinfo, 0, sizeof(bindinfo));
bindinfo.cbSize = sizeof(BINDINFO);
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
@@ -119,13 +123,6 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
ReleaseBindInfo(&bindinfo);
- if(!szUrl || !*szUrl)
- return E_INVALIDARG;
-
- if(lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
- || memcmp(szUrl, wszFile, sizeof(wszFile)))
- return MK_E_SYNTAX;
-
len = lstrlenW(szUrl)+16;
url = heap_alloc(len*sizeof(WCHAR));
hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);
More information about the wine-cvs
mailing list