Function GetVariable2() ensures its third (output) parameter will not be NULL when the return status is EFI_SUCCESS.
This commit adds ASSERT as warnings for the case that will not happen. Cc: Jiewen Yao <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <[email protected]> --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 9291ba3..d09b938 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -285,6 +285,7 @@ DmpCapsuleStatusVariable ( NULL ); if (!EFI_ERROR(Status)) { + ASSERT (CapsuleIndex != NULL); CopyMem(CapsuleIndexData, CapsuleIndex, 11 * sizeof(CHAR16)); CapsuleIndexData[11] = 0; Print(L"CapsuleMax - %s\n", CapsuleIndexData); @@ -297,6 +298,7 @@ DmpCapsuleStatusVariable ( NULL ); if (!EFI_ERROR(Status)) { + ASSERT (CapsuleIndex != NULL); CopyMem(CapsuleIndexData, CapsuleIndex, 11 * sizeof(CHAR16)); CapsuleIndexData[11] = 0; Print(L"CapsuleLast - %s\n", CapsuleIndexData); -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

