From 7afe1a31bde243077fc75c511f5ac34b95e1fff9 Mon Sep 17 00:00:00 2001 From: Songling Han Date: Thu, 17 Oct 2024 07:11:44 +0000 Subject: [PATCH] Fix build failure Signed-off-by: Songling Han --- src/common/sha2/sha2_c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/sha2/sha2_c.c b/src/common/sha2/sha2_c.c index c660374ff..ba71abab2 100644 --- a/src/common/sha2/sha2_c.c +++ b/src/common/sha2/sha2_c.c @@ -556,7 +556,7 @@ void oqs_sha2_sha512_inc_init_c(sha512ctx *state) { void oqs_sha2_sha224_inc_ctx_clone_c(sha224ctx *stateout, const sha224ctx *statein) { stateout->ctx = OQS_MEM_malloc(PQC_SHA256CTX_BYTES); - OQS_EXIT_IF_NULLPTR(state->ctx, "SHA2"); + OQS_EXIT_IF_NULLPTR(stateout->ctx, "SHA2"); stateout->data_len = statein->data_len; memcpy(stateout->data, statein->data, 128); memcpy(stateout->ctx, statein->ctx, PQC_SHA256CTX_BYTES); @@ -572,7 +572,7 @@ void oqs_sha2_sha256_inc_ctx_clone_c(sha256ctx *stateout, const sha256ctx *state void oqs_sha2_sha384_inc_ctx_clone_c(sha384ctx *stateout, const sha384ctx *statein) { stateout->ctx = OQS_MEM_malloc(PQC_SHA512CTX_BYTES); - OQS_EXIT_IF_NULLPTR(state->ctx, "SHA2"); + OQS_EXIT_IF_NULLPTR(stateout->ctx, "SHA2"); stateout->data_len = statein->data_len; memcpy(stateout->data, statein->data, 128); memcpy(stateout->ctx, statein->ctx, PQC_SHA512CTX_BYTES);