msi: Don't over-allocate memory for a MSISELECTVIEW.

Michael Stefaniuc mstefani at redhat.de
Fri Nov 9 09:47:56 CST 2012


---
 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..7c9ee71 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 + 1] ));
     if( !sv )
         return ERROR_FUNCTION_FAILED;
     
-- 
1.7.7.6



More information about the wine-patches mailing list