]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL
authorHao Wu <hao.a.wu@intel.com>
Mon, 21 Nov 2016 06:00:44 +0000 (14:00 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 22 Nov 2016 08:31:44 +0000 (16:31 +0800)
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>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c

index e333b55352b8a2af8dbe7cb555cd0e75742d5d15..76b25a37754fd636ea3f08cde3ac55c4c2c6550f 100644 (file)
@@ -1435,6 +1435,8 @@ TcgGetNextTcgUid(
     return TcgResultFailure;\r
   }\r
 \r
+  ASSERT (ByteSeq != NULL);\r
+\r
   CopyMem(Uid, ByteSeq, sizeof(TCG_UID));\r
 \r
   return TcgResultSuccess;\r