mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
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
1 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue