microsoft / mu_basecore

Project Mu BaseCore
https://microsoft.github.io/mu/
Other
242 stars 124 forks source link

[Cherry-Pick] StandaloneMmPkg/Include/Library/FvLib: Fix section data length larger. [Rebase & FF] #993

Closed apop5 closed 3 months ago

apop5 commented 3 months ago

Description

This change fixed an issue where the returned section data length is always 4 bytes larger than the real section. This would cause an issue where the caller could read into the final 4 bytes which is invalid data region.

Cherry-Pick the following commits:

Replaces the original b778f1e462 with the cherry-pick from edk2 051c7bb4

How This Was Tested

This is verified on QEMU Q35 platform and booted to UEFI shell.

Integration Instructions

N/A

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (release/202405@061ed98). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/202405 #993 +/- ## ================================================= Coverage ? 0.20% ================================================= Files ? 628 Lines ? 218357 Branches ? 326 ================================================= Hits ? 448 Misses ? 217900 Partials ? 9 ``` | [Flag](https://app.codecov.io/gh/microsoft/mu_basecore/pull/993/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | Coverage Δ | | |---|---|---| | [MdeModulePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/993/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.20% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.