diff options
author | Oliver Smith-Denny <osde@microsoft.com> | 2024-10-03 10:23:33 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-10-29 02:09:18 +0000 |
commit | 040afc1e3be6e3d334c2483803b0470a34bced55 (patch) | |
tree | 857c69039e886a39337aac982c1c850d91b7c331 /ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c | |
parent | 2d10dc1fb5a12a186b4401ce42fdd3f38a614037 (diff) | |
download | edk2-040afc1e3be6e3d334c2483803b0470a34bced55.zip edk2-040afc1e3be6e3d334c2483803b0470a34bced55.tar.gz edk2-040afc1e3be6e3d334c2483803b0470a34bced55.tar.bz2 |
ShellPkg: UefiShellDebug1CommandsLib: CodeQL Fixes
Includes changes across the module for the following CodeQL rules:
- cpp/comparison-with-wider-type
- cpp/overflow-buffer
- cpp/redundant-null-check-param
- cpp/uselesstest
Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com>
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c index a1a0559..d61a61e 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c @@ -269,6 +269,10 @@ EditGetDefaultFileName ( do {
FileNameTmp = CatSPrint (NULL, L"NewFile%d.%s", Suffix, Extension);
+ if (FileNameTmp == NULL) {
+ ASSERT (FileNameTmp != NULL);
+ return NULL;
+ }
//
// after that filename changed to path
|