diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c index fd6387a20a..5397071b3b 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c @@ -489,7 +489,8 @@ Returns: //
// now everything is ready , you can set the new file name to filebuffer
//
- if (BufferTypeBackup != FileTypeFileBuffer || StringNoCaseCompare (&FileName, &HFileImage.FileName) != 0) {
+ if ((BufferTypeBackup != FileTypeFileBuffer && FileName != NULL) ||
+ (FileName != NULL && HFileImage.FileName != NULL && StringNoCaseCompare (&FileName, &HFileImage.FileName) != 0)){
//
// not the same
//
|