summaryrefslogtreecommitdiff
path: root/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-10-03 20:30:45 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-29 05:09:18 +0300
commit1d64506f05e320f47e7170fa7d69ff89a953ce7b (patch)
tree3946980f441d509e0c0c0436fa1537c9ba5218ac /ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
parent875202bf85d528fb7c63c4827cfe013b58f2870f (diff)
downloadedk2-1d64506f05e320f47e7170fa7d69ff89a953ce7b.tar.xz
ShellPkg: DynamicCommand: 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/DynamicCommand/HttpDynamicCommand/Http.c')
-rw-r--r--ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
index b4e88e7635..37afefd80b 100644
--- a/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
+++ b/ShellPkg/DynamicCommand/HttpDynamicCommand/Http.c
@@ -1815,6 +1815,10 @@ DownloadFile (
Context->Uri,
StrLen (Context->Uri)
);
+ if (DownloadUrl == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto ON_EXIT;
+ }
PRINT_HII (STRING_TOKEN (STR_HTTP_DOWNLOADING), DownloadUrl);