summaryrefslogtreecommitdiff
path: root/ShellPkg/Application
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-28 21:49:17 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-28 21:49:17 +0000
commite35b53179454119ba0d8591ccdfee9f0efe5fd77 (patch)
treefa12df56752026e64c2cb461b755ef9946bf366f /ShellPkg/Application
parent590c3cb14ad6547528ea13805817676e32c204aa (diff)
downloadedk2-platforms-e35b53179454119ba0d8591ccdfee9f0efe5fd77.tar.xz
prevents "" from being the result of trying to open the root of a drive.
more input validation on vol command. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11444 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index e2da5d37ad..2d587ea03b 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -585,7 +585,11 @@ EfiShellGetDevicePathFromFilePath(
//
// build the full device path
//
- DevicePathForReturn = FileDevicePath(Handle, Path+StrLen(MapName)+1);
+ if (*(Path+StrLen(MapName)+1) == CHAR_NULL) {
+ DevicePathForReturn = FileDevicePath(Handle, L"\\");
+ } else {
+ DevicePathForReturn = FileDevicePath(Handle, Path+StrLen(MapName)+1);
+ }
FreePool(MapName);
if (DevicePathCopyForFree != NULL) {