Alexandre Julliard : msi: Avoid dynamic stack allocation.

Alexandre Julliard julliard at winehq.org
Mon Aug 29 11:28:37 CDT 2011


Module: wine
Branch: master
Commit: 2fcf1220eb0750dc03a1be25b308333188e6ce3f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2fcf1220eb0750dc03a1be25b308333188e6ce3f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Aug 29 13:52:32 2011 +0200

msi: Avoid dynamic stack allocation.

---

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

diff --git a/dlls/msi/where.c b/dlls/msi/where.c
index 16b6c03..cc80a71 100644
--- a/dlls/msi/where.c
+++ b/dlls/msi/where.c
@@ -610,7 +610,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
     MSIWHEREVIEW *wv = (MSIWHEREVIEW*)view;
     UINT r;
     JOINTABLE *table = wv->tables;
-    UINT rows[wv->table_count];
+    UINT *rows;
 
     TRACE("%p %p\n", wv, record);
 
@@ -638,6 +638,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
     }
     while ((table = table->next));
 
+    rows = msi_alloc( wv->table_count * sizeof(*rows) );
     r =  check_condition(wv, record, wv->tables, rows);
 
     if (wv->order_info)
@@ -647,7 +648,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
 
     if (wv->order_info)
         r = wv->order_info->error;
-
+    msi_free( rows );
     return r;
 }
 




More information about the wine-cvs mailing list