summaryrefslogtreecommitdiff
path: root/bin/rcp
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-08-29 20:44:04 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-08-29 20:44:04 +0000
commit98519f41a249c1fe03a79fd8cdc0127b25833ba1 (patch)
treeb77218cc1da1a81dfc4fa67a292094f5b431df78 /bin/rcp
parent2e2c63154c2d1d05a8dea16c9e55504f9b2e2276 (diff)
clear the malloc'd buffer, otherwise source() will leak malloc'd memory; ok theo@
Diffstat (limited to 'bin/rcp')
-rw-r--r--bin/rcp/util.c5
1 files changed, 3 insertions, 2 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);