mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
StandaloneMmPkg: CodeQL Fixes.
Makes changes to comply with alerts raised by CodeQL. Most of the issues here fall into the following two categories: 1. Potential use of uninitialized pointer 2. Inconsistent integer width used in loop comparison Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
This commit is contained in:
parent
e73ec56942
commit
d2e8118461
@ -655,7 +655,10 @@ FvIsBeingProcessed (
|
|||||||
DEBUG ((DEBUG_INFO, "FvIsBeingProcessed - 0x%08x\n", FwVolHeader));
|
DEBUG ((DEBUG_INFO, "FvIsBeingProcessed - 0x%08x\n", FwVolHeader));
|
||||||
|
|
||||||
KnownFwVol = AllocatePool (sizeof (KNOWN_FWVOL));
|
KnownFwVol = AllocatePool (sizeof (KNOWN_FWVOL));
|
||||||
ASSERT (KnownFwVol != NULL);
|
if (KnownFwVol == NULL) {
|
||||||
|
ASSERT (FALSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
KnownFwVol->Signature = KNOWN_FWVOL_SIGNATURE;
|
KnownFwVol->Signature = KNOWN_FWVOL_SIGNATURE;
|
||||||
KnownFwVol->FwVolHeader = FwVolHeader;
|
KnownFwVol->FwVolHeader = FwVolHeader;
|
||||||
|
@ -167,7 +167,7 @@ FfsFindNextFile (
|
|||||||
|
|
||||||
FileOffset = (UINT32)((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);
|
FileOffset = (UINT32)((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader);
|
||||||
|
|
||||||
while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {
|
while ((UINT64)FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) {
|
||||||
//
|
//
|
||||||
// Get FileState which is the highest bit of the State
|
// Get FileState which is the highest bit of the State
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user