Avoid fixed length buffers for conditions.
This commit is contained in:
parent
68680e9c0c
commit
298cdaead1
|
@ -993,8 +993,7 @@ static MSICOMPONENT* load_component( MSIRECORD * row )
|
|||
|
||||
comp->Attributes = MSI_RecordGetInteger(row,4);
|
||||
|
||||
sz = 0x100;
|
||||
MSI_RecordGetStringW(row,5,comp->Condition,&sz);
|
||||
comp->Condition = load_dynamic_stringW( row, 5 );
|
||||
|
||||
sz = IDENTIFIER_SIZE;
|
||||
MSI_RecordGetStringW(row,6,comp->KeyPath,&sz);
|
||||
|
@ -1826,7 +1825,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
|
|||
TRACE("Enabling or Disabling Components\n");
|
||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
||||
{
|
||||
if (comp->Condition[0])
|
||||
if (comp->Condition)
|
||||
{
|
||||
if (MSI_EvaluateConditionW(package,
|
||||
comp->Condition) == MSICONDITION_FALSE)
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef struct tagMSICOMPONENT
|
|||
WCHAR ComponentId[IDENTIFIER_SIZE];
|
||||
WCHAR Directory[IDENTIFIER_SIZE];
|
||||
INT Attributes;
|
||||
WCHAR Condition[0x100];
|
||||
LPWSTR Condition;
|
||||
WCHAR KeyPath[IDENTIFIER_SIZE];
|
||||
|
||||
INSTALLSTATE Installed;
|
||||
|
|
|
@ -485,6 +485,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
|
|||
MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry );
|
||||
|
||||
list_remove( &comp->entry );
|
||||
HeapFree( GetProcessHeap(), 0, comp->Condition );
|
||||
HeapFree( GetProcessHeap(), 0, comp->FullKeypath );
|
||||
HeapFree( GetProcessHeap(), 0, comp );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue