diff options
author | Hao Wu <hao.a.wu@intel.com> | 2019-04-22 13:42:18 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2019-04-28 08:31:38 +0800 |
commit | dfaa565559ba28a3b78c0f42b2480d28cecb7382 (patch) | |
tree | 6a36de88e98d0e4a6515b0e154621b58c25cf95c /BaseTools/Source/Python | |
parent | 20029ca22baaeb9418c1fd9df88d12d32d585cb6 (diff) | |
download | edk2-dfaa565559ba28a3b78c0f42b2480d28cecb7382.tar.gz edk2-dfaa565559ba28a3b78c0f42b2480d28cecb7382.tar.bz2 edk2-dfaa565559ba28a3b78c0f42b2480d28cecb7382.zip |
MdeModulePkg/DxeCore: Please static checker for false report
After commit 57df17fe26, some static check reports suspicious NULL pointer
deference at line:
Entry->MachineType = Entry->Emulator->MachineType;
^^^^^^^^^^^^^^^
within function PeCoffEmuProtocolNotify().
However, 'Entry->Emulator' is guaranteed to have a non-NULL value when
previous call to the CoreHandleProtocol() returns EFI_SUCCESS.
This commit will re-write the return status check for CoreHandleProtocol()
to add explicit NULL pointer check for protocol instance pointer.
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
0 files changed, 0 insertions, 0 deletions