diff options
author | Hao Wu <hao.a.wu@intel.com> | 2016-11-21 15:38:11 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-11-22 16:31:58 +0800 |
commit | 36e9e3e8ea0ce477504b6d2e21603ea94847efae (patch) | |
tree | 8c21409713f2a809db237f2db90a8f52330fb66a | |
parent | a8bcbf9c4d677c392e24893b86944e2cdeb8719e (diff) | |
download | edk2-36e9e3e8ea0ce477504b6d2e21603ea94847efae.tar.gz edk2-36e9e3e8ea0ce477504b6d2e21603ea94847efae.tar.bz2 edk2-36e9e3e8ea0ce477504b6d2e21603ea94847efae.zip |
SecurityPkg Tcg2Dxe: ASSERT to ensure 'VarData' is not NULL
The logic in functions ReadAndMeasureVariable() and MeasureVariable()
within Tcg2Dxe ensure that 'VarData' will not be NULL before calling
TcgDxeHashLogExtendEvent() at line 1716.
This commit adds ASSERT as warnings for the case that will not happen.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@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>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index 6241c5208b..9e8dfae6cc 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -1803,6 +1803,7 @@ MeasureVariable ( (UINT8*)VarLog
);
} else {
+ ASSERT (VarData != NULL);
Status = TcgDxeHashLogExtendEvent (
0,
(UINT8*)VarData,
|