Skip to content

Commit

Permalink
SecurityPkg: Fix the loop in DoDeviceMeasurement
Browse files Browse the repository at this point in the history
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
  • Loading branch information
Wenxing-hou authored and jyao1 committed Aug 25, 2023
1 parent 3d47429 commit 4c39ec9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmMeasurement.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ DoDeviceMeasurement (
}
}

ReceivedNumberOfBlock += 1;
DEBUG ((DEBUG_INFO, "ExtendMeasurement...\n"));
AuthState = TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_SUCCESS;
SecurityState->MeasurementState = EDKII_DEVICE_SECURITY_STATE_SUCCESS;
Expand All @@ -692,6 +691,8 @@ DoDeviceMeasurement (
if (Status != EFI_SUCCESS) {
return Status;
}

ReceivedNumberOfBlock += 1;
}

if (ReceivedNumberOfBlock != NumberOfBlocks) {
Expand Down

0 comments on commit 4c39ec9

Please sign in to comment.