ShellPkg: Fix changing to file system with 2 colons like "fs0::"

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
This commit is contained in:
Jaben Carsey 2014-02-11 23:56:32 +00:00 committed by jcarsey
parent ba71f79058
commit fc4c7b30d9
1 changed files with 4 additions and 2 deletions

View File

@ -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);