msi: Don't over-allocate memory for a MSISELECTVIEW. (2nd try)

Michael Stefaniuc mstefani at redhat.de
Mon Nov 12 03:28:39 CST 2012


---
With the correct patch this time.



 dlls/msi/select.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/select.c b/dlls/msi/select.c
index ada4eed..e8f3885 100644
--- a/dlls/msi/select.c
+++ b/dlls/msi/select.c
@@ -431,7 +431,7 @@ UINT SELECT_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
 
     count = select_count_columns( columns );
 
-    sv = msi_alloc_zero( sizeof *sv + count*sizeof (UINT) );
+    sv = msi_alloc_zero( FIELD_OFFSET( MSISELECTVIEW, cols[count] ));
     if( !sv )
         return ERROR_FUNCTION_FAILED;
     
-- 
1.7.7.6



More information about the wine-patches mailing list