[openssh-commits] [openssh] 06/09: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jan 15 01:48:36 AEDT 2016


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch V_7_1
in repository openssh.

commit 34d364f0d2e1e30a444009f0e04299bb7c94ba13
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Oct 5 17:11:21 2015 +0000

    upstream commit
    
    some more bzero->explicit_bzero, from Michael McConville
    
    Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
---
 sshbuf-misc.c | 10 +++++-----
 sshbuf.c      |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sshbuf-misc.c b/sshbuf-misc.c
index d022065..3da4b80 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;
 }
diff --git a/sshbuf.c b/sshbuf.c
index 9915e9a..19e162c 100644
--- a/sshbuf.c
+++ b/sshbuf.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: sshbuf.c,v 1.3 2015/01/20 23:14:00 deraadt Exp $	*/
+/*	$OpenBSD: sshbuf.c,v 1.4 2015/10/05 17:11:21 djm Exp $	*/
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -177,7 +177,7 @@ sshbuf_free(struct sshbuf *buf)
 		return;
 	dont_free = buf->dont_free;
 	if (!buf->readonly) {
-		bzero(buf->d, buf->alloc);
+		explicit_bzero(buf->d, buf->alloc);
 		free(buf->d);
 	}
 	explicit_bzero(buf, sizeof(*buf));

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list