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);
|
comp->Attributes = MSI_RecordGetInteger(row,4);
|
||||||
|
|
||||||
sz = 0x100;
|
comp->Condition = load_dynamic_stringW( row, 5 );
|
||||||
MSI_RecordGetStringW(row,5,comp->Condition,&sz);
|
|
||||||
|
|
||||||
sz = IDENTIFIER_SIZE;
|
sz = IDENTIFIER_SIZE;
|
||||||
MSI_RecordGetStringW(row,6,comp->KeyPath,&sz);
|
MSI_RecordGetStringW(row,6,comp->KeyPath,&sz);
|
||||||
|
@ -1826,7 +1825,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
|
||||||
TRACE("Enabling or Disabling Components\n");
|
TRACE("Enabling or Disabling Components\n");
|
||||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
||||||
{
|
{
|
||||||
if (comp->Condition[0])
|
if (comp->Condition)
|
||||||
{
|
{
|
||||||
if (MSI_EvaluateConditionW(package,
|
if (MSI_EvaluateConditionW(package,
|
||||||
comp->Condition) == MSICONDITION_FALSE)
|
comp->Condition) == MSICONDITION_FALSE)
|
||||||
|
|
|
@ -54,7 +54,7 @@ typedef struct tagMSICOMPONENT
|
||||||
WCHAR ComponentId[IDENTIFIER_SIZE];
|
WCHAR ComponentId[IDENTIFIER_SIZE];
|
||||||
WCHAR Directory[IDENTIFIER_SIZE];
|
WCHAR Directory[IDENTIFIER_SIZE];
|
||||||
INT Attributes;
|
INT Attributes;
|
||||||
WCHAR Condition[0x100];
|
LPWSTR Condition;
|
||||||
WCHAR KeyPath[IDENTIFIER_SIZE];
|
WCHAR KeyPath[IDENTIFIER_SIZE];
|
||||||
|
|
||||||
INSTALLSTATE Installed;
|
INSTALLSTATE Installed;
|
||||||
|
|
|
@ -485,6 +485,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
|
||||||
MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry );
|
MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry );
|
||||||
|
|
||||||
list_remove( &comp->entry );
|
list_remove( &comp->entry );
|
||||||
|
HeapFree( GetProcessHeap(), 0, comp->Condition );
|
||||||
HeapFree( GetProcessHeap(), 0, comp->FullKeypath );
|
HeapFree( GetProcessHeap(), 0, comp->FullKeypath );
|
||||||
HeapFree( GetProcessHeap(), 0, comp );
|
HeapFree( GetProcessHeap(), 0, comp );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue