Files
edk2/BaseTools/Source
Evgenii Shatokhin e93ee87643 BaseTools: FMMT: Fix incorrect size calculation in ModifyTest()
There is another issue in FvHander.py similar to the one fixed by
a60334ad59 ("BaseTools: Fix FMMT FvHandler Padding operation issue").

For a guided section (ParTree.Data.Type == 0x02), the length of
ParTree.Data.OriData is used to obtain the original size of the data even
after ParTree.Data.OriData has changed, which is incorrect.

This caused the following issue I observed. I built OVMF image for Aarch64
and then tried to add a couple FFS modules to it with 'FMMT -a [...]'. The
resulting image turned out to be invalid: the total size of the image was
less than the size of the firmware volume within it.

UEFITool failed to load such firmware image and complained:
"parseRawArea: one of objects inside overlaps the end of data".

This patch fixes the issue.

Signed-off-by: Evgenii Shatokhin <euspectre@gmail.com>
2025-11-22 11:53:36 +00:00
..