Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by CopyMem().
Cc: Eric Dong <[email protected]> Cc: Feng Tian <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <[email protected]> --- SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c index e333b55..76b25a3 100644 --- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c +++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c @@ -1435,6 +1435,8 @@ TcgGetNextTcgUid( return TcgResultFailure; } + ASSERT (ByteSeq != NULL); + CopyMem(Uid, ByteSeq, sizeof(TCG_UID)); return TcgResultSuccess; -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

