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>
This commit is contained in:
parent
875202bf85
commit
1d64506f05
|
@ -1815,6 +1815,10 @@ DownloadFile (
|
||||||
Context->Uri,
|
Context->Uri,
|
||||||
StrLen (Context->Uri)
|
StrLen (Context->Uri)
|
||||||
);
|
);
|
||||||
|
if (DownloadUrl == NULL) {
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto ON_EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
PRINT_HII (STRING_TOKEN (STR_HTTP_DOWNLOADING), DownloadUrl);
|
PRINT_HII (STRING_TOKEN (STR_HTTP_DOWNLOADING), DownloadUrl);
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,11 @@ RunTftp (
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2);
|
RemoteFilePath = ShellCommandLineGetRawValue (CheckPackage, 2);
|
||||||
ASSERT (RemoteFilePath != NULL);
|
if (RemoteFilePath == NULL) {
|
||||||
|
ASSERT (RemoteFilePath != NULL);
|
||||||
|
goto Error;
|
||||||
|
}
|
||||||
|
|
||||||
FilePathSize = StrLen (RemoteFilePath) + 1;
|
FilePathSize = StrLen (RemoteFilePath) + 1;
|
||||||
AsciiRemoteFilePath = AllocatePool (FilePathSize);
|
AsciiRemoteFilePath = AllocatePool (FilePathSize);
|
||||||
if (AsciiRemoteFilePath == NULL) {
|
if (AsciiRemoteFilePath == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue