summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c
index 955e082a93..213e28a829 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c
@@ -315,7 +315,11 @@ ShellCommandRunParse (
ShellCommandInstance = ShellStrToUintn (ShellCommandLineGetValue (Package, L"-s"));
}
- ShellStatus = PerformParsing (FileName, TableName, ShellStrToUintn (ColumnString), TableNameInstance, ShellCommandInstance, StreamingUnicode);
+ if ((FileName != NULL) && (TableName != NULL) && (ColumnString != NULL)) {
+ ShellStatus = PerformParsing (FileName, TableName, ShellStrToUintn (ColumnString), TableNameInstance, ShellCommandInstance, StreamingUnicode);
+ } else {
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ }
}
}