mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02: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
@ -885,6 +885,13 @@ AhciPrintStatusBlock (
|
|||||||
IN UINT32 DebugLevel
|
IN UINT32 DebugLevel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// Skip NULL pointer
|
||||||
|
//
|
||||||
|
if (AtaStatusBlock == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Only print status and error since we have all of the rest printed as
|
// Only print status and error since we have all of the rest printed as
|
||||||
// a part of command block print.
|
// a part of command block print.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user