summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-05-11 02:26:40 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-05-11 02:26:40 +0000
commit6ed1ef48199e6f5c9aa8fa1005ef2d121c29497f (patch)
treeaa7abd5d83094bf28fa2e15f1995961ac7196cba
parenteae41d39f8bac2c04cc6bb1f18322742f3bfb44e (diff)
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--lib/libcrypto/evp/e_chacha20poly1305.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/evp/e_chacha20poly1305.c b/lib/libcrypto/evp/e_chacha20poly1305.c
index 051d5548b5b..b709c24270b 100644
--- a/lib/libcrypto/evp/e_chacha20poly1305.c
+++ b/lib/libcrypto/evp/e_chacha20poly1305.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_chacha20poly1305.c,v 1.16 2017/05/02 03:59:44 deraadt Exp $ */
+/* $OpenBSD: e_chacha20poly1305.c,v 1.17 2017/05/11 02:26:39 jsg Exp $ */
/*
* Copyright (c) 2015 Reyk Floter <reyk@openbsd.org>
@@ -83,7 +83,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx)
{
struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
- freezero(c20_ctx, sizeof(c20_ctx));
+ freezero(c20_ctx, sizeof(*c20_ctx));
}
static void