From 88061d18303a68fc57c9f7abe5775cb7b6ba02c8 Mon Sep 17 00:00:00 2001
From: jsg <>
Date: Thu, 11 May 2017 02:26:39 +0000
Subject: 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@
---
 src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib')

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 @@
-/* $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
-- 
cgit v1.2.3-55-g6feb