From 66a321f8929826c820a40140fffacb73732ef86f Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Wed, 9 Jul 2014 15:46:23 +0000 Subject: use explicit_bzero for stack and freed variables --- sys/kern/tty_pty.c | 6 +++--- sys/kern/tty_subr.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/kern') 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; -- cgit v1.2.3