summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2011-06-20 22:14:18 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2011-06-20 22:14:18 +0000
commit945bb73444974383a50266b126ea026f9dbaa6e5 (patch)
tree182e89df4d2be87c0379c66a83c67931a3a73b50 /sys/dev/vnd.c
parentd88c1c928a6a94d813d5b48f5cb0bf27d6091026 (diff)
explicit_bzero for the crypto key
Diffstat (limited to 'sys/dev/vnd.c')
-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);
}