diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2016-01-19 10:10:58 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2016-01-19 10:10:58 +0000 |
| commit | 4cb2962809c63c51f6f7e029b95f2bdb622f1e4a (patch) | |
| tree | f6d7eaf2dffb55ee5734fc7dba7ef0ed9f73c654 /sshbuf-misc.c | |
| parent | a7a7e85cd3829fe5c5348d8fbd25e98c3b315b58 (diff) | |
Diffstat (limited to 'sshbuf-misc.c')
| -rw-r--r-- | sshbuf-misc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sshbuf-misc.c b/sshbuf-misc.c index d022065f92a4..3da4b80e7658 100644 --- a/sshbuf-misc.c +++ b/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 * @@ -103,7 +103,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; } @@ -122,16 +122,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; } |
