]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/setvar: Add assertion indicating TempData shouldn't be NULL
authorRuiyu Ni <ruiyu.ni@intel.com>
Wed, 5 Apr 2017 05:56:30 +0000 (13:56 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 5 Apr 2017 05:57:11 +0000 (13:57 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c

index fc76b583f93be644bcd4d4ec4ddf5add32dcc3fc..7cbe0d93eea11f1c5c10f6aa347cd7fc142d7e2e 100644 (file)
@@ -1,4 +1,4 @@
-/** @file\r
+/** @file\r
   Main file for SetVar shell Debug1 function.\r
 \r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
@@ -279,6 +279,7 @@ GetVariableDataFromParameter (
 \r
   for (Index = 2; Index < ShellCommandLineGetCount (Package); Index++) {\r
     TempData = ShellCommandLineGetRawValue (Package, Index);\r
+    ASSERT (TempData != NULL);\r
 \r
     if (TempData[0] != L'=') {\r
       ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", TempData);\r