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

libspdm_hmac_new returns incorrect type #2961

Closed
steven-bellock opened this issue Jan 16, 2025 · 0 comments · Fixed by #2963
Closed

libspdm_hmac_new returns incorrect type #2961

steven-bellock opened this issue Jan 16, 2025 · 0 comments · Fixed by #2963
Assignees
Labels
bug Something isn't working

Comments

@steven-bellock
Copy link
Contributor

void *libspdm_hmac_new(uint32_t base_hash_algo)
{
switch (base_hash_algo) {
case SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_256:
#if LIBSPDM_SHA256_SUPPORT
return libspdm_hmac_sha256_new();
#else
LIBSPDM_ASSERT(false);
return false;
#endif

Function return type is void * but some paths return false instead of NULL.

@steven-bellock steven-bellock added the bug Something isn't working label Jan 16, 2025
@steven-bellock steven-bellock self-assigned this Jan 16, 2025
steven-bellock added a commit to steven-bellock/libspdm that referenced this issue Jan 17, 2025
Fix DMTF#2961.

Signed-off-by: Steven Bellock <[email protected]>
steven-bellock added a commit to steven-bellock/libspdm that referenced this issue Jan 17, 2025
Fix DMTF#2961.

Signed-off-by: Steven Bellock <[email protected]>
jyao1 pushed a commit that referenced this issue Jan 20, 2025
Fix #2961.

Signed-off-by: Steven Bellock <[email protected]>
ShitalJumbad pushed a commit to ShitalJumbad/libspdm that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant