mirror of
https://github.com/Dasharo/edk2.git
synced 2026-06-13 10:16:24 -07:00
e93ee87643
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>