summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-12 17:49:48 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-12 17:49:48 +0000
commit5fccbc233957671774d925c8dc6694c7236b56a0 (patch)
tree717173e96d29e6335babe7adda8aba0c5ee5d26d /scp.c
parent14f31ab947acd4c0b1698195782b904e0d6c7686 (diff)
downloadopenssh-git-5fccbc233957671774d925c8dc6694c7236b56a0.tar.gz
- markus@cvs.openbsd.org 2001/08/29 20:44:03
[scp.c] clear the malloc'd buffer, otherwise source() will leak malloc'd memory; ok theo@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scp.c b/scp.c
index 868a8eb3..9b0a23f0 100644
--- a/scp.c
+++ b/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"
@@ -1049,6 +1049,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);
}