Make sure not to access invalid components or features.

This commit is contained in:
Mike McCormack 2005-09-12 11:08:20 +00:00 committed by Alexandre Julliard
parent 9dc4921e2f
commit cbb5709a04
1 changed files with 6 additions and 0 deletions

View File

@ -772,6 +772,9 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, MSICOMPONENT* comp, BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, MSICOMPONENT* comp,
INSTALLSTATE check ) INSTALLSTATE check )
{ {
if (!comp)
return FALSE;
if (comp->Installed == check) if (comp->Installed == check)
return FALSE; return FALSE;
@ -783,6 +786,9 @@ BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, MSICOMPONENT* comp,
BOOL ACTION_VerifyFeatureForAction( MSIFEATURE* feature, INSTALLSTATE check ) BOOL ACTION_VerifyFeatureForAction( MSIFEATURE* feature, INSTALLSTATE check )
{ {
if (!feature)
return FALSE;
if (feature->Installed == check) if (feature->Installed == check)
return FALSE; return FALSE;