ShellParametersProtocol - remove parsing from within quoted parameters.

Pci - Add missing enumeration in switch statement.
For - Verify parameter before dereferencing.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11511 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2011-04-07 17:12:12 +00:00
parent b97a8d3586
commit d8f8021cbe
3 changed files with 27 additions and 24 deletions

View File

@ -589,11 +589,16 @@ ShellCommandRunFor (
ASSERT(ArgSet == NULL);
}
Info = (SHELL_FOR_INFO*)CurrentScriptFile->CurrentCommand->Data;
if (CurrentScriptFile->CurrentCommand->Reset) {
Info->CurrentValue = (CHAR16*)Info->Set;
FirstPass = TRUE;
CurrentScriptFile->CurrentCommand->Reset = FALSE;
if (CurrentScriptFile != NULL && CurrentScriptFile->CurrentCommand != NULL) {
Info = (SHELL_FOR_INFO*)CurrentScriptFile->CurrentCommand->Data;
if (CurrentScriptFile->CurrentCommand->Reset) {
Info->CurrentValue = (CHAR16*)Info->Set;
FirstPass = TRUE;
CurrentScriptFile->CurrentCommand->Reset = FALSE;
}
} else {
ShellStatus = SHELL_UNSUPPORTED;
Info = NULL;
}
if (ShellStatus == SHELL_SUCCESS) {
ASSERT(Info != NULL);