msi: Fix buffer size calculation in MsiEnumPatchesA.

Hans Leidekker hans at codeweavers.com
Fri Feb 20 04:56:50 CST 2009


Fixes a heap corruption seen while installing Office 2007 SP1.

diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 7f9dcb2..66a40ef 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -2003,7 +2003,7 @@ UINT WINAPI MsiEnumPatchesA(LPCSTR szProduct, DWORD iPatchIndex,
     if (r != ERROR_MORE_DATA)
         goto done;
 
-    transforms = msi_alloc(len);
+    transforms = msi_alloc(len * sizeof(WCHAR));
     if (!transforms)
     {
         r = ERROR_OUTOFMEMORY;



More information about the wine-patches mailing list