[buffer.c]
     protect against double free; #660;  zardoz at users.sf.net
This commit is contained in:
Darren Tucker 2003-09-22 21:00:19 +10:00
parent bd5361b237
commit d2730d39a1
2 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,9 @@
- markus@cvs.openbsd.org 2003/09/18 07:52:54 - markus@cvs.openbsd.org 2003/09/18 07:52:54
[sshconnect.c] [sshconnect.c]
missing {}; bug #656; jclonguet at free.fr missing {}; bug #656; jclonguet at free.fr
- markus@cvs.openbsd.org 2003/09/18 07:54:48
[buffer.c]
protect against double free; #660; zardoz at users.sf.net
20030919 20030919
- (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL; - (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL;
@ -1169,4 +1172,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.3024 2003/09/22 10:59:16 dtucker Exp $ $Id: ChangeLog,v 1.3025 2003/09/22 11:00:19 dtucker Exp $

View File

@ -12,7 +12,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: buffer.c,v 1.18 2003/09/16 21:02:39 markus Exp $"); RCSID("$OpenBSD: buffer.c,v 1.19 2003/09/18 07:54:48 markus Exp $");
#include "xmalloc.h" #include "xmalloc.h"
#include "buffer.h" #include "buffer.h"
@ -39,6 +39,7 @@ buffer_free(Buffer *buffer)
{ {
if (buffer->alloc > 0) { if (buffer->alloc > 0) {
memset(buffer->buf, 0, buffer->alloc); memset(buffer->buf, 0, buffer->alloc);
buffer->alloc = 0;
xfree(buffer->buf); xfree(buffer->buf);
} }
} }