Commit 5c121226 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Allocate memory rather than using fixed length buffers.

parent 0232c5c4
...@@ -1110,13 +1110,8 @@ static UINT load_feature(MSIRECORD * row, LPVOID param) ...@@ -1110,13 +1110,8 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
if (!MSI_RecordIsNull(row,2)) if (!MSI_RecordIsNull(row,2))
MSI_RecordGetStringW(row,2,feature->Feature_Parent,&sz); MSI_RecordGetStringW(row,2,feature->Feature_Parent,&sz);
sz = 0x100; feature->Title = load_dynamic_stringW( row, 3 );
if (!MSI_RecordIsNull(row,3)) feature->Description = load_dynamic_stringW( row, 4 );
MSI_RecordGetStringW(row,3,feature->Title,&sz);
sz = 0x100;
if (!MSI_RecordIsNull(row,4))
MSI_RecordGetStringW(row,4,feature->Description,&sz);
if (!MSI_RecordIsNull(row,5)) if (!MSI_RecordIsNull(row,5))
feature->Display = MSI_RecordGetInteger(row,5); feature->Display = MSI_RecordGetInteger(row,5);
......
...@@ -30,8 +30,8 @@ typedef struct tagMSIFEATURE ...@@ -30,8 +30,8 @@ typedef struct tagMSIFEATURE
struct list entry; struct list entry;
WCHAR Feature[IDENTIFIER_SIZE]; WCHAR Feature[IDENTIFIER_SIZE];
WCHAR Feature_Parent[IDENTIFIER_SIZE]; WCHAR Feature_Parent[IDENTIFIER_SIZE];
WCHAR Title[0x100]; LPWSTR Title;
WCHAR Description[0x100]; LPWSTR Description;
INT Display; INT Display;
INT Level; INT Level;
WCHAR Directory[IDENTIFIER_SIZE]; WCHAR Directory[IDENTIFIER_SIZE];
......
...@@ -438,6 +438,8 @@ static void free_feature( MSIFEATURE *feature ) ...@@ -438,6 +438,8 @@ static void free_feature( MSIFEATURE *feature )
list_remove( &cl->entry ); list_remove( &cl->entry );
HeapFree( GetProcessHeap(), 0, cl ); HeapFree( GetProcessHeap(), 0, cl );
} }
HeapFree( GetProcessHeap(), 0, feature->Description );
HeapFree( GetProcessHeap(), 0, feature->Title );
HeapFree( GetProcessHeap(), 0, feature ); HeapFree( GetProcessHeap(), 0, feature );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment