diff options
author | 2015-10-05 17:11:21 +0000 | |
---|---|---|
committer | 2015-10-05 17:11:21 +0000 | |
commit | 10ed543622a3816c0f525423cd97306870cf6be5 (patch) | |
tree | 2742a02e55652e9efe02d2dec906a73c1f651465 /usr.bin/ssh/sshbuf-misc.c | |
parent | correct picasso's birth date; (diff) | |
download | wireguard-openbsd-10ed543622a3816c0f525423cd97306870cf6be5.tar.xz wireguard-openbsd-10ed543622a3816c0f525423cd97306870cf6be5.zip |
some more bzero->explicit_bzero, from Michael McConville
Diffstat (limited to 'usr.bin/ssh/sshbuf-misc.c')
-rw-r--r-- | usr.bin/ssh/sshbuf-misc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/sshbuf-misc.c b/usr.bin/ssh/sshbuf-misc.c index 9c541159f14..2f75803dd15 100644 --- a/usr.bin/ssh/sshbuf-misc.c +++ b/usr.bin/ssh/sshbuf-misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf-misc.c,v 1.4 2015/03/24 20:03:44 markus Exp $ */ +/* $OpenBSD: sshbuf-misc.c,v 1.5 2015/10/05 17:11:21 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -99,7 +99,7 @@ sshbuf_dtob64(struct sshbuf *buf) if (SIZE_MAX / 2 <= len || (ret = malloc(plen)) == NULL) return NULL; if ((r = b64_ntop(p, len, ret, plen)) == -1) { - bzero(ret, plen); + explicit_bzero(ret, plen); free(ret); return NULL; } @@ -118,16 +118,16 @@ sshbuf_b64tod(struct sshbuf *buf, const char *b64) if ((p = malloc(plen)) == NULL) return SSH_ERR_ALLOC_FAIL; if ((nlen = b64_pton(b64, p, plen)) < 0) { - bzero(p, plen); + explicit_bzero(p, plen); free(p); return SSH_ERR_INVALID_FORMAT; } if ((r = sshbuf_put(buf, p, nlen)) < 0) { - bzero(p, plen); + explicit_bzero(p, plen); free(p); return r; } - bzero(p, plen); + explicit_bzero(p, plen); free(p); return 0; } |