diff options
-rw-r--r-- | bin/rcp/util.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/scp.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/rcp/util.c b/bin/rcp/util.c index 17c8ca12742..6613730d14c 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.9 2001/07/09 07:04:27 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.10 2001/08/29 20:44:03 markus Exp $ */ /* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: util.c,v 1.9 2001/07/09 07:04:27 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.10 2001/08/29 20:44:03 markus Exp $"; #endif #endif /* not lint */ @@ -162,6 +162,7 @@ allocbuf(bp, fd, blksize) run_err("%s", strerror(errno)); return (0); } + memset(p, 0, size); bp->buf = p; bp->cnt = size; return (bp); diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 3f120b04679..fb95155c372 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.80 2001/08/13 23:38:54 stevesk Exp $"); +RCSID("$OpenBSD: scp.c,v 1.81 2001/08/29 20:44:03 markus Exp $"); #include "xmalloc.h" #include "atomicio.h" @@ -1010,6 +1010,7 @@ allocbuf(bp, fd, blksize) bp->buf = xmalloc(size); else bp->buf = xrealloc(bp->buf, size); + memset(bp->buf, 0, size); bp->cnt = size; return (bp); } |