diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-09 15:46:23 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-09 15:46:23 +0000 |
commit | 66a321f8929826c820a40140fffacb73732ef86f (patch) | |
tree | 57be648d5b8f2b7b8a90a03ac0d292ad87c99af0 /sys/kern | |
parent | 73c8eea4a8422bf567b939e5cde3b27d9ebd844f (diff) |
use explicit_bzero for stack and freed variables
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_pty.c | 6 | ||||
-rw-r--r-- | sys/kern/tty_subr.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 40528697c33..94c10c0dc7b 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.65 2014/03/30 21:54:48 guenther Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.66 2014/07/09 15:46:22 tedu Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -503,7 +503,7 @@ ptcread(dev_t dev, struct uio *uio, int flag) } ttwakeupwr(tp); if (bufcc) - bzero(buf, bufcc); + explicit_bzero(buf, bufcc); return (error); } @@ -604,7 +604,7 @@ block: uio->uio_resid += cc; done: if (bufcc) - bzero(buf, bufcc); + explicit_bzero(buf, bufcc); return (error); } diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index 1449dd472c5..aa8c39a6a3e 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_subr.c,v 1.26 2012/05/24 19:46:27 nicm Exp $ */ +/* $OpenBSD: tty_subr.c,v 1.27 2014/07/09 15:46:22 tedu Exp $ */ /* $NetBSD: tty_subr.c,v 1.13 1996/02/09 19:00:43 christos Exp $ */ /* @@ -72,11 +72,11 @@ void clfree(struct clist *clp) { if (clp->c_cs) { - bzero(clp->c_cs, clp->c_cn); + explicit_bzero(clp->c_cs, clp->c_cn); free(clp->c_cs, M_TTYS); } if (clp->c_cq) { - bzero(clp->c_cq, QMEM(clp->c_cn)); + explicit_bzero(clp->c_cq, QMEM(clp->c_cn)); free(clp->c_cq, M_TTYS); } clp->c_cs = clp->c_cq = NULL; |