diff --git a/dlls/msi/action.c b/dlls/msi/action.c index daf572fbbbe..eb3b431d849 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -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) diff --git a/dlls/msi/action.h b/dlls/msi/action.h index 0efc8219af3..edf5b4a24b6 100644 --- a/dlls/msi/action.h +++ b/dlls/msi/action.h @@ -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; diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index 767ed706216..9fd2087fb71 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -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 ); }