From 040afc1e3be6e3d334c2483803b0470a34bced55 Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Thu, 3 Oct 2024 10:23:33 -0700 Subject: 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 Signed-off-by: Oliver Smith-Denny --- .../Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c') 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 -- cgit v1.1