V1:
This patch is to fix the issue that StandaloneMmCore fails to detect uncompressed inner FV.
PR:
https://github.com/tianocore/edk2/pull/4943
V2:
Based on V1, fix some other issues
1. Add Missing object size checks before casting pointers to header types
a. InnerFvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SectionData;
This is introduced in V1, add the size check on SectionDataSize against EFI_FIRMWARE_VOLUME_HEADER
b. Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
Use FfsFindSection instead of FfsFindSectionData to avoid pointer casting.
2. Fix potential memory leak issue that ScratchBuffer is not freed when page allocation for DstBuffer fails.
PR:
https://github.com/tianocore/edk2/pull/4965
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ray Ni <ray.ni@intel.com>
Wei6 Xu (1):
StandaloneMmPkg: Fix some issues in function MmCoreFfsFindMmDriver.
StandaloneMmPkg/Core/FwVol.c | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
--
2.29.2.windows.2