diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2013-12-02 03:13:15 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2013-12-02 03:13:15 +0000 |
commit | 88d07979b4dd6a79c3aa8a0287d555f10b7392c4 (patch) | |
tree | 6564cb3575a6516e24ca2de7da1257efac70c1f3 /usr.bin/ssh | |
parent | 83cec98d48431f6c977c2d9d925bc129e609edc3 (diff) |
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
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/cipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c index 513fd17cac7..67fc8ba898c 100644 --- a/usr.bin/ssh/cipher.c +++ b/usr.bin/ssh/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 <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -394,7 +394,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"); } |