[Resent, against recebt CVS] urlmon/umon.c: Fix corrution
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Sun Jul 10 13:17:47 CDT 2005
Changelog:
wine/dlls/urlmon/umon.c:URLMonikerImpl_BindToStorage()
Don't use a HeapAllocated pointer for other purposes
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/urlmon/umon.c
===================================================================
RCS file: /home/wine/wine/dlls/urlmon/umon.c,v
retrieving revision 1.58
diff -u -r1.58 umon.c
--- wine/dlls/urlmon/umon.c 3 Jul 2005 12:05:03 -0000 1.58
+++ wine/dlls/urlmon/umon.c 10 Jul 2005 18:13:02 -0000
@@ -598,7 +598,7 @@
if(SUCCEEDED(hres)) {
WCHAR *urlcopy, *tmpwc;
URL_COMPONENTSW url;
- WCHAR *host, *path, *user, *pass;
+ WCHAR *host, *path, *partial_path, *user, *pass;
DWORD lensz = sizeof(bind->expected_size);
DWORD dwService = 0;
BOOL bSuccess;
@@ -797,9 +797,9 @@
break;
case INTERNET_SCHEME_FILE:
- path = bind->URLName + 5; /* Skip the "file:" part */
- if ((path[0] != '/' && path[0] != '\\') ||
- (path[1] != '/' && path[1] != '\\'))
+ partial_path = bind->URLName + 5; /* Skip the "file:" part */
+ if ((partial_path[0] != '/' && partial_path[0] != '\\') ||
+ (partial_path[1] != '/' && partial_path[1] != '\\'))
{
hres = E_FAIL;
}
@@ -807,10 +807,10 @@
{
HANDLE h;
- path += 2;
- if (path[0] == '/' || path[0] == '\\')
- ++path;
- h = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
+ partial_path += 2;
+ if (partial_path[0] == '/' || partial_path[0] == '\\')
+ ++partial_path;
+ h = CreateFileW(partial_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
if (h == (HANDLE) HFILE_ERROR)
{
hres = HRESULT_FROM_WIN32(GetLastError());
More information about the wine-patches
mailing list