diff --git a/MdePkg/Library/TdxLib/Rtmr.c b/MdePkg/Library/TdxLib/Rtmr.c index a0283966b3..cbf1dda7bc 100644 --- a/MdePkg/Library/TdxLib/Rtmr.c +++ b/MdePkg/Library/TdxLib/Rtmr.c @@ -51,7 +51,7 @@ TdExtendRtmr ( ASSERT (Data != NULL); ASSERT (DataLen == SHA384_DIGEST_SIZE); - ASSERT (Index >= 0 && Index < RTMR_COUNT); + ASSERT (Index < RTMR_COUNT); if ((Data == NULL) || (DataLen != SHA384_DIGEST_SIZE) || (Index >= RTMR_COUNT)) { return EFI_INVALID_PARAMETER;