From fc4c7b30d9f0e5d3d9bc8dad13c5737c3da34f29 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Tue, 11 Feb 2014 23:56:32 +0000 Subject: [PATCH] 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 Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15226 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 6 ++++-- 1 file 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); -- 2.39.2