mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
MdeModulePkg: FvSimpleFileSystemDxe cumulative codeql issues.
Running Codeql on MdeModulePkg/Universal/FvSimpleFileSystemDxe drivers results in codeql errors stemming from missing null tests. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
This commit is contained in:
parent
4cb3e8d467
commit
cb85c4deef
2 changed files with 8 additions and 1 deletions
|
|
@ -562,6 +562,10 @@ FvSimpleFileSystemOpen (
|
|||
// NewFileNameLength = FileNameLength + 1 + 4 = (Number of non-null character) + (file extension) + (a null character)
|
||||
NewFileNameLength = FileNameLength + 1 + 4;
|
||||
FileNameWithExtension = AllocatePool (NewFileNameLength * 2);
|
||||
if (FileNameWithExtension == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
StrCpyS (FileNameWithExtension, NewFileNameLength, FileName);
|
||||
StrCatS (FileNameWithExtension, NewFileNameLength, L".EFI");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue