mirror of https://github.com/acidanthera/audk.git
MdeModulePkg CapsuleApp: ASSERT to ensure 'CapsuleIndex' is not NULL
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 <jiewen.yao@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>
This commit is contained in:
parent
b43dd22981
commit
a522ad7c19
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue