Michael Stefaniuc : msi: Don't over-allocate memory for a MSISELECTVIEW.
Alexandre Julliard
julliard at winehq.org
Mon Nov 12 14:14:40 CST 2012
Module: wine
Branch: master
Commit: dad296794365d685082e8fa4eec626e73aea0b80
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dad296794365d685082e8fa4eec626e73aea0b80
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Nov 12 10:28:39 2012 +0100
msi: Don't over-allocate memory for a MSISELECTVIEW.
---
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;
More information about the wine-cvs
mailing list