]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/EfiCompress.c
ShellPkg: Fixes and updates for the 'devices' command
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / EfiCompress.c
index d4bb6217b0fa3c30c3132efa0cae666d2ebd43a3..25e8718980f69e5bcc8d776e5126115feb05ca87 100644 (file)
@@ -42,6 +42,7 @@ ShellCommandRunEfiCompress (
   VOID                *InBuffer;\r
   CHAR16              *InFileName;\r
   CONST CHAR16        *OutFileName;\r
+  CONST CHAR16        *TempParam;\r
 \r
   InFileName          = NULL;\r
   OutFileName         = NULL;\r
@@ -82,10 +83,12 @@ ShellCommandRunEfiCompress (
       ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle);\r
       ShellStatus = SHELL_INVALID_PARAMETER;\r
     } else {\r
-      InFileName = ShellFindFilePath(ShellCommandLineGetRawValue(Package, 1));\r
+      TempParam = ShellCommandLineGetRawValue(Package, 1);\r
+      ASSERT(TempParam != NULL);\r
+      InFileName = ShellFindFilePath(TempParam);\r
       OutFileName = ShellCommandLineGetRawValue(Package, 2);\r
       if (InFileName == NULL) {\r
-        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, 1));\r
+        ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, TempParam);\r
         ShellStatus = SHELL_NOT_FOUND;\r
       } else {\r
         if (ShellIsDirectory(InFileName) == EFI_SUCCESS){\r