]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix changing to file system with 2 colons like "fs0::"
authorJaben Carsey <jaben.carsey@intel.com>
Tue, 11 Feb 2014 23:56:32 +0000 (23:56 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Feb 2014 23:56:32 +0000 (23:56 +0000)
first colon must be last character in the string.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15226 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/Shell.c

index e00a57ba2ea9e2a092c3cbc9b02ee645d496cc40..2d5c89aadfe9e64a02e0e4b3559a2428fb02273a 100644 (file)
@@ -1677,10 +1677,12 @@ GetOperationType(
   }\r
 \r
   //\r
-  // Test for file system change request.  anything ending with : and cant have spaces.\r
+  // Test for file system change request.  anything ending with first : and cant have spaces.\r
   //\r
   if (CmdName[(StrLen(CmdName)-1)] == L':') {\r
-    if (StrStr(CmdName, L" ") != NULL) {\r
+    if ( StrStr(CmdName, L" ") != NULL \r
+      || StrLen(StrStr(CmdName, L":")) > 1\r
+      ) {\r
       return (Unknown_Invalid);\r
     }\r
     return (File_Sys_Change);\r