diff options
author | 2012-09-05 19:49:08 +0000 | |
---|---|---|
committer | 2012-09-05 19:49:08 +0000 | |
commit | b85d50d7733e66a9e1f3d7486ac4843984db95c3 (patch) | |
tree | 4a50b5b2f50fdf8918c83c9aebd9a7189c16ab85 | |
parent | COMPAT_O48 can be turned off; ok guenther (diff) | |
download | wireguard-openbsd-b85d50d7733e66a9e1f3d7486ac4843984db95c3.tar.xz wireguard-openbsd-b85d50d7733e66a9e1f3d7486ac4843984db95c3.zip |
overwrite with random stream; a repeating chunk of random data isn't
random at all
ok tedu@
-rw-r--r-- | bin/rm/rm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 41b574edca1..a653bb54f17 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rm.c,v 1.26 2012/09/04 22:22:50 tedu Exp $ */ +/* $OpenBSD: rm.c,v 1.27 2012/09/05 19:49:08 naddy Exp $ */ /* $NetBSD: rm.c,v 1.19 1995/09/07 06:48:50 jtc Exp $ */ /*- @@ -329,9 +329,9 @@ pass(int fd, off_t len, char *buf, size_t bsize) { size_t wlen; - arc4random_buf(buf, bsize); for (; len > 0; len -= wlen) { wlen = len < bsize ? len : bsize; + arc4random_buf(buf, wlen); if (write(fd, buf, wlen) != wlen) return (0); } |