mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
a8bcbf9c4d
commit
36e9e3e8ea
|
@ -1803,6 +1803,7 @@ MeasureVariable (
|
||||||
(UINT8*)VarLog
|
(UINT8*)VarLog
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
ASSERT (VarData != NULL);
|
||||||
Status = TcgDxeHashLogExtendEvent (
|
Status = TcgDxeHashLogExtendEvent (
|
||||||
0,
|
0,
|
||||||
(UINT8*)VarData,
|
(UINT8*)VarData,
|
||||||
|
|
Loading…
Reference in New Issue