From 5c1212261f62f2dbca67f62d9adf58c93151a422 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 8 Sep 2005 12:42:31 +0000 Subject: [PATCH] Allocate memory rather than using fixed length buffers. --- dlls/msi/action.c | 9 ++------- dlls/msi/action.h | 4 ++-- dlls/msi/helpers.c | 2 ++ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 870d32486f9..a3e25846477 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1110,13 +1110,8 @@ static UINT load_feature(MSIRECORD * row, LPVOID param) if (!MSI_RecordIsNull(row,2)) MSI_RecordGetStringW(row,2,feature->Feature_Parent,&sz); - sz = 0x100; - if (!MSI_RecordIsNull(row,3)) - MSI_RecordGetStringW(row,3,feature->Title,&sz); - - sz = 0x100; - if (!MSI_RecordIsNull(row,4)) - MSI_RecordGetStringW(row,4,feature->Description,&sz); + feature->Title = load_dynamic_stringW( row, 3 ); + feature->Description = load_dynamic_stringW( row, 4 ); if (!MSI_RecordIsNull(row,5)) feature->Display = MSI_RecordGetInteger(row,5); diff --git a/dlls/msi/action.h b/dlls/msi/action.h index 78b07b4a300..e1e4ac24c9f 100644 --- a/dlls/msi/action.h +++ b/dlls/msi/action.h @@ -30,8 +30,8 @@ typedef struct tagMSIFEATURE struct list entry; WCHAR Feature[IDENTIFIER_SIZE]; WCHAR Feature_Parent[IDENTIFIER_SIZE]; - WCHAR Title[0x100]; - WCHAR Description[0x100]; + LPWSTR Title; + LPWSTR Description; INT Display; INT Level; WCHAR Directory[IDENTIFIER_SIZE]; diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index 115f03ceb46..4ba45242ba4 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -438,6 +438,8 @@ static void free_feature( MSIFEATURE *feature ) list_remove( &cl->entry ); HeapFree( GetProcessHeap(), 0, cl ); } + HeapFree( GetProcessHeap(), 0, feature->Description ); + HeapFree( GetProcessHeap(), 0, feature->Title ); HeapFree( GetProcessHeap(), 0, feature ); } -- 2.11.4.GIT