aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-01-26 13:01:30 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-01-26 13:01:30 +0900
commit8cf35fc003ac9ca5dbc153d46ce15bfc1c731c2a (patch)
tree73f6fc027cbfba7770a818ed4916bbb1fe365877
parentf0deb4d352774491919f1b1ba861014659651d66 (diff)
downloadopenssl-topic/evp-chacha20-poly1305-cleanup-typofix.tar.gz
Properly zero cipher_data for ChaCha20-Poly1305 on cleanuptopic/evp-chacha20-poly1305-cleanup-typofix
Fix a typo. Probably this has not been found because EVP_CIPHER_CTX is smaller than EVP_CHACHA_AEAD_CTX and heap overflow does not occur.
-rw-r--r--crypto/evp/e_chacha20_poly1305.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index befd805e35..e730c2bb65 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -316,7 +316,7 @@ static int chacha20_poly1305_cleanup(EVP_CIPHER_CTX *ctx)
{
EVP_CHACHA_AEAD_CTX *actx = aead_data(ctx);
if (actx)
- OPENSSL_cleanse(ctx->cipher_data, sizeof(*ctx) + Poly1305_ctx_size());
+ OPENSSL_cleanse(ctx->cipher_data, sizeof(*actx) + Poly1305_ctx_size());
return 1;
}