]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
ShellPkg/setvar: Add assertion indicating TempData shouldn't be NULL
[mirror_edk2.git] / 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