X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FHexEdit%2FHexEdit.c;h=53718c775138928d87c04622a553b2bc79c7d0a9;hp=0a97a6ca29c226dd9f241df3b6fc4542f12553f1;hb=33c031ee2092282a069ce07d30202082ceaf61fe;hpb=6b825919f1c16b07b5cac7fc5e298fbeb530d888 diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c index 0a97a6ca29..53718c7751 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c @@ -110,7 +110,7 @@ ShellCommandRunHexEdit ( ShellStatus = SHELL_INVALID_PARAMETER; } else { Name = ShellCommandLineGetRawValue(Package, 1); - if (!IsValidFileName(Name)) { + if (Name == NULL || !IsValidFileName(Name)) { ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Name); ShellStatus = SHELL_INVALID_PARAMETER; } else {