mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
BaseTools/EfiRom: Avoid possible NULL pointer dereference
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
2ff3293d7b
commit
02875ba228
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Utility program to create an EFI option ROM image from binary and EFI PE32 files.
|
||||
|
||||
Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
distribution. The full text of the license may be found at
|
||||
@ -95,6 +95,7 @@ Returns:
|
||||
// the command line, or the first input filename with a different extension.
|
||||
//
|
||||
if (!mOptions.OutFileName[0]) {
|
||||
if (mOptions.FileList != NULL) {
|
||||
strcpy (mOptions.OutFileName, mOptions.FileList->FileName);
|
||||
//
|
||||
// Find the last . on the line and replace the filename extension with
|
||||
@ -114,6 +115,7 @@ Returns:
|
||||
|
||||
strcpy (Ext, DEFAULT_OUTPUT_EXTENSION);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Make sure we don't have the same filename for input and output files
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user