summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2017-04-05 13:56:30 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2017-04-05 13:57:11 +0800
commit028db58d1f5aebb973a00dd30118f05f6284e5c4 (patch)
tree927a54023c0167607e68dd0b4a023225b5eab3fc
parent3ff1e8987b0b6dd82cdda8f02127582caace57d6 (diff)
ShellPkg/setvar: Add assertion indicating TempData shouldn't be NULL
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
index fc76b583f9..7cbe0d93ee 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
@@ -1,4 +1,4 @@
-/** @file
+/** @file
Main file for SetVar shell Debug1 function.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
@@ -279,6 +279,7 @@ GetVariableDataFromParameter (
for (Index = 2; Index < ShellCommandLineGetCount (Package); Index++) {
TempData = ShellCommandLineGetRawValue (Package, Index);
+ ASSERT (TempData != NULL);
if (TempData[0] != L'=') {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", TempData);