mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
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>
This commit is contained in:
parent
3ff1e8987b
commit
028db58d1f
@ -1,4 +1,4 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Main file for SetVar shell Debug1 function.
|
Main file for SetVar shell Debug1 function.
|
||||||
|
|
||||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||||
@ -279,6 +279,7 @@ GetVariableDataFromParameter (
|
|||||||
|
|
||||||
for (Index = 2; Index < ShellCommandLineGetCount (Package); Index++) {
|
for (Index = 2; Index < ShellCommandLineGetCount (Package); Index++) {
|
||||||
TempData = ShellCommandLineGetRawValue (Package, Index);
|
TempData = ShellCommandLineGetRawValue (Package, Index);
|
||||||
|
ASSERT (TempData != NULL);
|
||||||
|
|
||||||
if (TempData[0] != L'=') {
|
if (TempData[0] != L'=') {
|
||||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", TempData);
|
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", TempData);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user