- 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@
This commit is contained in:
parent
14f31ab947
commit
5fccbc2339
|
@ -42,6 +42,10 @@
|
||||||
- markus@cvs.openbsd.org 2001/08/28 15:39:48
|
- markus@cvs.openbsd.org 2001/08/28 15:39:48
|
||||||
[ssh.1 ssh.c]
|
[ssh.1 ssh.c]
|
||||||
allow: ssh -F configfile host
|
allow: ssh -F configfile host
|
||||||
|
- 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@
|
||||||
|
|
||||||
20010815
|
20010815
|
||||||
- (bal) Fixed stray code in readconf.c that went in by mistake.
|
- (bal) Fixed stray code in readconf.c that went in by mistake.
|
||||||
|
@ -6365,4 +6369,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1497 2001/09/12 17:48:04 mouring Exp $
|
$Id: ChangeLog,v 1.1498 2001/09/12 17:49:48 mouring Exp $
|
||||||
|
|
3
scp.c
3
scp.c
|
@ -75,7 +75,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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 "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
|
@ -1049,6 +1049,7 @@ allocbuf(bp, fd, blksize)
|
||||||
bp->buf = xmalloc(size);
|
bp->buf = xmalloc(size);
|
||||||
else
|
else
|
||||||
bp->buf = xrealloc(bp->buf, size);
|
bp->buf = xrealloc(bp->buf, size);
|
||||||
|
memset(bp->buf, 0, size);
|
||||||
bp->cnt = size;
|
bp->cnt = size;
|
||||||
return (bp);
|
return (bp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue