]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
pointer verification (not NULL) and buffer overrun fixes.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / HexEdit.c
index 0a97a6ca29c226dd9f241df3b6fc4542f12553f1..53718c775138928d87c04622a553b2bc79c7d0a9 100644 (file)
@@ -110,7 +110,7 @@ ShellCommandRunHexEdit (
         ShellStatus = SHELL_INVALID_PARAMETER;\r
       } else {\r
         Name      = ShellCommandLineGetRawValue(Package, 1);\r
-        if (!IsValidFileName(Name)) {\r
+        if (Name == NULL || !IsValidFileName(Name)) {\r
           ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Name);\r
           ShellStatus = SHELL_INVALID_PARAMETER;\r
         } else {\r