Skip to content

Commit

Permalink
[core] Fix HaiCrypt_Clone(): set up RX crypto ctx properly (#2905).
Browse files Browse the repository at this point in the history
  • Loading branch information
funman authored Apr 4, 2024
1 parent 84b5bb8 commit c6afa19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions haicrypt/hcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ int HaiCrypt_Clone(HaiCrypt_Handle hhcSrc, HaiCrypt_CryptoDir tx, HaiCrypt_Handl
cryptoClone->ctx_pair[1].flags &= ~HCRYPT_CTX_F_ENCRYPT;
memset(cryptoClone->ctx_pair[0].salt, 0, sizeof(cryptoClone->ctx_pair[0].salt));
cryptoClone->ctx_pair[0].salt_len = 0;
cryptoClone->ctx = &cryptoClone->ctx_pair[0];
}

*phhc = (void *)cryptoClone;
Expand Down

0 comments on commit c6afa19

Please sign in to comment.