diff options
author | 2014-07-09 15:46:22 +0000 | |
---|---|---|
committer | 2014-07-09 15:46:22 +0000 | |
commit | 1bfdce7812af84340b28b46455eca063d28ec990 (patch) | |
tree | e5db08cd4d4974dc0aa46917aa18fdbbce34a9fb | |
parent | spelling (diff) | |
download | wireguard-openbsd-1bfdce7812af84340b28b46455eca063d28ec990.tar.xz wireguard-openbsd-1bfdce7812af84340b28b46455eca063d28ec990.zip |
use explicit_bzero for stack and freed variables
-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; |