diff options
| author | Gowtham M <gowthamm@ami.com> | 2025-10-28 10:34:13 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-11-05 05:28:06 +0300 |
| commit | 059332bda3c08a730394e4a5b8a9b4fade0bf371 (patch) | |
| tree | fd25fa74be8b5f89fc107c3e2cd306660d5c8351 /BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | |
| parent | 05b677c9de2cb3c4486736eb795c12e8008c3797 (diff) | |
| download | edk2-059332bda3c08a730394e4a5b8a9b4fade0bf371.tar.xz | |
ArmPkg/Library: Fix for coverity issue OVERRUN
RootCause: SectionSize, SectionLength and FileLength are declared as
UINTN, UINTN and UINT32 but are typecast to UINT32 and masked
with 0x00FFFFFF to store only the lower 24 bits.
Although this approach yields the correct result,
it introduces a potential security vulnerability due to
unsafe typecasting and dereferencing.
Solution: Using the predefined macro FFS_FILE_SIZE()
from MdePkg\Include\Pi\PiFirmwareFile.h,
which safely performs the same operation by reconstruct
the size using individual byte access.
Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Gowtham M <gowthamm@ami.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/ModuleAutoGen.py')
0 files changed, 0 insertions, 0 deletions
