[MSI] increase the size of the 'Components' array

Lionel Ulmer lionel.ulmer at free.fr
Thu Aug 18 04:10:47 CDT 2005


The MSI installer downloadable for free at the following URL
( http://www.telltalegames.com/products?pc=tth01 ) crashes with Wine.

After discussing it with Mike (M) on IRC, he found out that the installer
uses more that the hard-coded limit of 1024 components and thus overflows
the array which leads to a crash later on.

He provided the hacky patch attached to this mail (it lets the game install)
but, in his own words, the best way to fix this would be to remove the
fixed size arrays and replace it with any 'unlimited' data structure (linked
lists, ...).

Changelog:
  Mike McCormack <mike at codeweavers.com>
  - increase size of 'Components' array

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/msi/action.h
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.h,v
retrieving revision 1.22
diff -u -r1.22 action.h
--- dlls/msi/action.h	30 Jun 2005 20:45:43 -0000	1.22
+++ dlls/msi/action.h	18 Aug 2005 09:05:00 -0000
@@ -36,7 +36,7 @@
     INSTALLSTATE Action;
 
     INT ComponentCount;
-    INT Components[1024]; /* yes hardcoded limit.... I am bad */
+    INT Components[2048]; /* yes hardcoded limit.... I am bad */
     INT Cost;
 } MSIFEATURE;
 


More information about the wine-patches mailing list