summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsg <>2017-05-11 02:26:39 +0000
committerjsg <>2017-05-11 02:26:39 +0000
commit88061d18303a68fc57c9f7abe5775cb7b6ba02c8 (patch)
tree57e3f6c5fc4092cb1e77a8d62903a58378f79c7c
parent5f64f36094433c7ef3912c187243ab5b1c54b413 (diff)
downloadopenbsd-88061d18303a68fc57c9f7abe5775cb7b6ba02c8.tar.gz
openbsd-88061d18303a68fc57c9f7abe5775cb7b6ba02c8.tar.bz2
openbsd-88061d18303a68fc57c9f7abe5775cb7b6ba02c8.zip
Fix a problem introduced in freezero() conversion and use
sizeof(struct) not sizeof(pointer). otto@ points out that on OpenBSD currently freezero() would have still zeroed the entire allocation, but this is not documented behaviour and may change in future. ok tom@
-rw-r--r--src/lib/libcrypto/evp/e_chacha20poly1305.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c
index 051d5548b5..b709c24270 100644
--- a/src/lib/libcrypto/evp/e_chacha20poly1305.c
+++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_chacha20poly1305.c,v 1.16 2017/05/02 03:59:44 deraadt Exp $ */ 1/* $OpenBSD: e_chacha20poly1305.c,v 1.17 2017/05/11 02:26:39 jsg Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2015 Reyk Floter <reyk@openbsd.org> 4 * Copyright (c) 2015 Reyk Floter <reyk@openbsd.org>
@@ -83,7 +83,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx)
83{ 83{
84 struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; 84 struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
85 85
86 freezero(c20_ctx, sizeof(c20_ctx)); 86 freezero(c20_ctx, sizeof(*c20_ctx));
87} 87}
88 88
89static void 89static void