Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce non-zero measurement count #2764

Merged
merged 1 commit into from
Jul 14, 2024
Merged

Conversation

steven-bellock
Copy link
Contributor

Fix #2727.

Signed-off-by: Steven Bellock [email protected]

@steven-bellock steven-bellock added the enhancement New feature or request label Jul 11, 2024
@steven-bellock steven-bellock marked this pull request as ready for review July 11, 2024 22:58
@@ -269,6 +266,10 @@ libspdm_return_t libspdm_get_response_measurements(libspdm_context_t *spdm_conte
}
}

LIBSPDM_ASSERT(measurements_size <= SPDM_MAX_MEASUREMENT_RECORD_LENGTH);
LIBSPDM_ASSERT(measurements_size <= meas_opaque_buffer_size);
LIBSPDM_ASSERT(measurements_count != 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add measurements_size != 0 ?

@jyao1 jyao1 merged commit 2d4c531 into DMTF:main Jul 14, 2024
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add assertions after libspdm_measurement_collection
2 participants