From a8bcbf9c4d677c392e24893b86944e2cdeb8719e Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Mon, 21 Nov 2016 14:00:44 +0800 Subject: SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by CopyMem(). Cc: Eric Dong Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Jiewen Yao --- SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'SecurityPkg') diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c index e333b55352..76b25a3775 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; -- cgit v1.2.3