Skip to content

Commit

Permalink
Fix build failure
Browse files Browse the repository at this point in the history
Signed-off-by: Songling Han <[email protected]>
  • Loading branch information
songlingatpan committed Oct 18, 2024
1 parent 2077298 commit 7afe1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/sha2/sha2_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7afe1a3

Please sign in to comment.