Fix nasty little bug in InitializeGenericSF

Joshua Thielen thielen at netprince.net
Thu Jul 11 10:24:41 CDT 2002


Hello!

This patch fixes a little bug that caused heap corruption (ouch!) when 
running the Finale 2002 installer. Man, was this hard to find!

Changelog:
Fixed space allocation for sNewPath in InitializeGenericSF.

Modified Files:
wine/dlls/shell32/shlfolder.c


Cheers!

Josh Thielen


-------------- next part --------------
Index: wine/dlls/shell32/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.71
diff -u -r1.71 shlfolder.c
--- wine/dlls/shell32/shlfolder.c	2 Jul 2002 02:05:17 -0000	1.71
+++ wine/dlls/shell32/shlfolder.c	11 Jul 2002 15:16:00 -0000
@@ -503,7 +503,7 @@
 	        sPos = sNewPath;
 	    }
 	    _ILSimpleGetText(pidlFolder, sPos, MAX_PATH - (sPos - sNewPath));
-	    if(!((sf->sPathRoot = SHAlloc(strlen(sNewPath+1))))) return E_OUTOFMEMORY;
+	    if(!((sf->sPathRoot = SHAlloc(strlen(sNewPath)+1)))) return E_OUTOFMEMORY;
 	    strcpy(sf->sPathRoot, sNewPath);
 	    TRACE("-- %s\n", sNewPath);
 	}


More information about the wine-patches mailing list