Allocate memory rather than using fixed length buffers.
This commit is contained in:
parent
0232c5c45f
commit
5c1212261f
@ -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
|
|||||||
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 )
|
|||||||
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user