public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL
@ 2016-11-21  7:52 Hao Wu
  2016-11-21  7:57 ` Yao, Jiewen
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Wu @ 2016-11-21  7:52 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Eric Dong, Feng Tian

Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by
CopyMem().

Cc: Eric Dong <eric.dong@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-21  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21  7:52 [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL Hao Wu
2016-11-21  7:57 ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox