summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/Shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Application/Shell/Shell.c')
-rw-r--r--ShellPkg/Application/Shell/Shell.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c
index e00a57ba2e..2d5c89aadf 100644
--- a/ShellPkg/Application/Shell/Shell.c
+++ b/ShellPkg/Application/Shell/Shell.c
@@ -1677,10 +1677,12 @@ GetOperationType(
}
//
- // Test for file system change request. anything ending with : and cant have spaces.
+ // Test for file system change request. anything ending with first : and cant have spaces.
//
if (CmdName[(StrLen(CmdName)-1)] == L':') {
- if (StrStr(CmdName, L" ") != NULL) {
+ if ( StrStr(CmdName, L" ") != NULL
+ || StrLen(StrStr(CmdName, L":")) > 1
+ ) {
return (Unknown_Invalid);
}
return (File_Sys_Change);