diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-11-21 14:00:44 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-22 16:31:44 +0800 |
commit | a8bcbf9c4d677c392e24893b86944e2cdeb8719e (patch) | |
tree | f6b27ae425eb2699a5479a77b2e2af34177c8663 /SecurityPkg | |
parent | a522ad7c192b5cf3b31d3152eb082236fbda7243 (diff) | |
download | edk2-platforms-a8bcbf9c4d677c392e24893b86944e2cdeb8719e.tar.xz |
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 <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>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 |
1 files changed, 2 insertions, 0 deletions
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;
|