When multiple fields are found in 'for' command return invalid parameters error.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18416
6f19259b-4bc3-4df7-8a09-
765794883524
gEfiShellParametersProtocol->Argv[2]) == 0) {\r
for (LoopVar = 0x3 ; LoopVar < gEfiShellParametersProtocol->Argc ; LoopVar++) {\r
ASSERT((ArgSet == NULL && ArgSize == 0) || (ArgSet != NULL));\r
+ if (StrStr (gEfiShellParametersProtocol->Argv[LoopVar], L")") != NULL &&\r
+ (LoopVar + 1) < gEfiShellParametersProtocol->Argc\r
+ ) {\r
+ return (SHELL_INVALID_PARAMETER);\r
+ }\r
if (ArgSet == NULL) {\r
// ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);\r
} else {\r