summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2011-06-20 22:14:17 +0000
committertedu <tedu@openbsd.org>2011-06-20 22:14:17 +0000
commit1c7e67e92119f34b61b36f335b6c430bb22f158b (patch)
treed14a379364337cf9ff7d86937c26e1500d4b8b91 /sys/dev
parentRestore changelist(5) wildcard support that we inadvertently killed (diff)
downloadwireguard-openbsd-1c7e67e92119f34b61b36f335b6c430bb22f158b.tar.xz
wireguard-openbsd-1c7e67e92119f34b61b36f335b6c430bb22f158b.zip
explicit_bzero for the crypto key
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vnd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 2c2348b0ec3..6f392994f9f 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.131 2011/06/20 16:46:06 deraadt Exp $ */
+/* $OpenBSD: vnd.c,v 1.132 2011/06/20 22:14:17 tedu Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -551,7 +551,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
sc->sc_keyctx = malloc(sizeof(*sc->sc_keyctx), M_DEVBUF,
M_WAITOK);
blf_key(sc->sc_keyctx, key, vio->vnd_keylen);
- bzero(key, vio->vnd_keylen);
+ explicit_bzero(key, vio->vnd_keylen);
} else
sc->sc_keyctx = NULL;
@@ -595,7 +595,7 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
/* Free crypto key */
if (sc->sc_keyctx) {
- bzero(sc->sc_keyctx, sizeof(*sc->sc_keyctx));
+ explicit_bzero(sc->sc_keyctx, sizeof(*sc->sc_keyctx));
free(sc->sc_keyctx, M_DEVBUF);
}