mirror of https://github.com/acidanthera/audk.git
MdeModulePkg AtaAtapiPassThru: Skip the potential NULL pointer access
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3732
Recent change c9742578
exposes this potential issue.
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
e1e7306b54
commit
4c7ce0d285
|
@ -885,6 +885,13 @@ AhciPrintStatusBlock (
|
|||
IN UINT32 DebugLevel
|
||||
)
|
||||
{
|
||||
//
|
||||
// Skip NULL pointer
|
||||
//
|
||||
if (AtaStatusBlock == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Only print status and error since we have all of the rest printed as
|
||||
// a part of command block print.
|
||||
|
|
Loading…
Reference in New Issue