Skip to content

Memory allocation test verifies incorrect variable #5318

@GregDomjan

Description

@GregDomjan
  • Which version of WiX are you building with?
    3.7/3.9.2/3.10.2
  • Describe the problem and the steps to reproduce it.

Reading code to identify an issue with a patch bundle using burn.
Noticed ExitOnNull testing same variable rgPatchInfo looks like it should be verifying rgPatchInfoToPackage on second usage.
https://github.com/wixtoolset/wix3/blob/wix3103/src/burn/engine/package.cpp#L255-256

        pPackages->rgPatchInfo = static_cast<MSIPATCHSEQUENCEINFOW*>(MemAlloc(sizeof(MSIPATCHSEQUENCEINFOW) * cMspPackages, TRUE));
        ExitOnNull(pPackages->rgPatchInfo, hr, E_OUTOFMEMORY, "Failed to allocate memory for MSP patch sequence information.");

        pPackages->rgPatchInfoToPackage = static_cast<BURN_PACKAGE**>(MemAlloc(sizeof(BURN_PACKAGE*) * cMspPackages, TRUE));
        ExitOnNull(pPackages->rgPatchInfo, hr, E_OUTOFMEMORY, "Failed to allocate memory for patch sequence information to package lookup.");

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions