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 <[email protected]> Cc: Chao Zhang <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <[email protected]> --- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index f0545a6..6a350e2 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -1713,6 +1713,7 @@ MeasureVariable ( (UINT8*)VarLog ); } else { + ASSERT (VarData != NULL); Status = TcgDxeHashLogExtendEvent ( 0, (UINT8*)VarData, -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

