dlls/shell32/shelllink.c
Ge van Geldorp
gvg at reactos.com
Wed Mar 16 02:52:12 CST 2005
I have some shortcuts (created in Windows 2000) which only have 24 bytes of
LOCATION_INFO, i.e. they are missing the dwFinalPathOfs member.
Also lots of shortcuts seem to have another chunk at the end of the stream,
I get a lot of "Last word was not zero" messages.
Changelog:
Ge van Geldorp <gvg at reactos.com>
- Handle shortcuts with missing dwFinalPathOfs member in LOCATION_INFO
- Change ERR to TRACE since the event described seems common
Index: dlls/shell32/shelllink.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shelllink.c,v
retrieving revision 1.85
diff -u -r1.85 shelllink.c
--- dlls/shell32/shelllink.c 2 Mar 2005 13:53:51 -0000 1.85
+++ dlls/shell32/shelllink.c 16 Mar 2005 08:44:38 -0000
@@ -591,7 +591,7 @@
return r;
loc = (LOCATION_INFO*) p;
- if (loc->dwTotalSize < sizeof(LOCATION_INFO))
+ if (loc->dwTotalSize < sizeof(LOCATION_INFO) - sizeof(DWORD))
{
HeapFree( GetProcessHeap(), 0, p );
return E_FAIL;
@@ -822,7 +822,7 @@
r = IStream_Read(stm, &zero, sizeof zero, &dwBytesRead);
if( FAILED( r ) || zero || dwBytesRead != sizeof zero )
- ERR("Last word was not zero\n");
+ TRACE("Last word was not zero\n");
TRACE("OK\n");
More information about the wine-patches
mailing list