summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-07 17:12:12 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-07 17:12:12 +0000
commitd8f8021cbe89187c443e6a9ee89eb3edc8248ab4 (patch)
treef9839a4926ff36aea907d79f14d03c8b5004a320 /ShellPkg/Application/Shell
parentb97a8d3586266504c6140ffd111a6d80ce471225 (diff)
downloadedk2-platforms-d8f8021cbe89187c443e6a9ee89eb3edc8248ab4.tar.xz
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
Diffstat (limited to 'ShellPkg/Application/Shell')
-rw-r--r--ShellPkg/Application/Shell/ShellParametersProtocol.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c
index b90a2c32bb..5d2792ba30 100644
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c
@@ -69,9 +69,7 @@ GetNextParameter(
if ((*Walker)[0] == L'\"') {
NextDelim = NULL;
for (TempLoc = *Walker + 1 ; TempLoc != NULL && *TempLoc != CHAR_NULL ; TempLoc++) {
- if (*TempLoc == L'^' && *(TempLoc+1) == L'^') {
- TempLoc++;
- } else if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {
+ if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {
TempLoc++;
} else if (*TempLoc == L'\"') {
NextDelim = TempLoc;
@@ -96,10 +94,7 @@ GetNextParameter(
*Walker = NULL;
}
for (TempLoc = *TempParameter ; TempLoc != NULL && *TempLoc != CHAR_NULL ; TempLoc++) {
- if ((*TempLoc == L'^' && *(TempLoc+1) == L'^')
- || (*TempLoc == L'^' && *(TempLoc+1) == L'|')
- || (*TempLoc == L'^' && *(TempLoc+1) == L'\"')
- ){
+ if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {
CopyMem(TempLoc, TempLoc+1, StrSize(TempLoc) - sizeof(TempLoc[0]));
}
}
@@ -123,9 +118,7 @@ GetNextParameter(
for (NextDelim = *TempParameter ; NextDelim != NULL && *NextDelim != CHAR_NULL ; NextDelim++) {
if (*NextDelim == L'^' && *(NextDelim+1) == L'^') {
CopyMem(NextDelim, NextDelim+1, StrSize(NextDelim) - sizeof(NextDelim[0]));
- }/* else if (*NextDelim == L'^') {
- *NextDelim = L' ';
- }*/
+ }
}
while ((*TempParameter)[StrLen(*TempParameter)-1] == L' ') {
(*TempParameter)[StrLen(*TempParameter)-1] = CHAR_NULL;