From 960f6a2b5254e4da082d8aa3700302ed12dc769a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 5 Dec 2013 10:26:14 +1100 Subject: - djm@cvs.openbsd.org 2013/12/02 03:13:14 [cipher.c] correct bzero of chacha20+poly1305 key context. bz#2177 from Loganaden Velvindron @ AfriNIC Also make it a memset for consistency with the rest of cipher.c --- cipher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cipher.c') diff --git a/cipher.c b/cipher.c index c4aec392..fbb73014 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.91 2013/11/21 00:45:44 djm Exp $ */ +/* $OpenBSD: cipher.c,v 1.92 2013/12/02 03:13:14 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -414,7 +414,7 @@ void cipher_cleanup(CipherContext *cc) { if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) - bzero(&cc->cp_ctx, sizeof(&cc->cp_ctx)); + memset(&cc->cp_ctx, 0, sizeof(cc->cp_ctx)); else if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0) error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed"); } -- cgit v1.2.3