X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FHexEdit%2FFileImage.c;h=fd6387a20a9a78e98e8817dc696259c859a6d245;hp=adf79281974e77c84807f056109878bb7f0363f4;hb=33c031ee2092282a069ce07d30202082ceaf61fe;hpb=632820d1cf1ce7a18ef354255eaeae6fdbf383b9 diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c index adf7928197..fd6387a20a 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c @@ -301,6 +301,7 @@ Returns: HBufferImage.HighBits = TRUE; HBufferImage.BufferPosition.Row = 1; HBufferImage.BufferPosition.Column = 1; + HBufferImage.BufferType = FileTypeFileBuffer; if (!Recover) { UnicodeBuffer = CatSPrint(NULL, L"%d Lines Read", HBufferImage.NumLines); @@ -382,7 +383,7 @@ Returns: // // if is the old file // - if (StrCmp (FileName, HFileImage.FileName) == 0) { + if (HFileImage.FileName != NULL && FileName != NULL && StrCmp (FileName, HFileImage.FileName) == 0) { // // check whether file exists on disk //