summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/ShellProtocol.c
diff options
context:
space:
mode:
authorRevathy V <revathyv@ami.com>2025-07-15 14:58:46 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-07-24 07:57:29 +0000
commitbe6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b (patch)
tree92acb37c695efd66a1d26a29905f0eb5b05defde /ShellPkg/Application/Shell/ShellProtocol.c
parent01295fd25b0465f6a82682e7adbfdbec70c4beb1 (diff)
downloadedk2-be6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b.zip
edk2-be6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b.tar.gz
edk2-be6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b.tar.bz2
ShellPkg: Fixed Deadcode and Null field Coverity warnings.
Updated fixes for all Deadcode and Null field Coverity fixes in ShellPkg Signed-off-by: Revathy <revathyv@ami.com>
Diffstat (limited to 'ShellPkg/Application/Shell/ShellProtocol.c')
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index 3bc6239..646294d 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -2853,7 +2853,11 @@ EfiShellGetEnvEx (
; Node = (ENV_VAR_LIST *)GetNextNode (&gShellEnvVarList.Link, &Node->Link)
)
{
- ASSERT (Node->Key != NULL);
+ if (Node->Key == NULL) {
+ ASSERT (FALSE);
+ continue;
+ }
+
Size += StrSize (Node->Key);
}