summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-09-23 18:55:43 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-09-23 18:55:43 +1000
commite1318fb07f775f2d54cacd98c217de9c25fbe964 (patch)
tree697f887b253e75a2f47c3166c819895e8b41887d
parentd640322dd83423ee78cea4d576ea29395454dabd (diff)
- markus@cvs.openbsd.org 2003/09/18 07:54:48
[buffer.c] protect against double free; #660; zardoz at users.sf.net
-rw-r--r--ChangeLog5
-rw-r--r--buffer.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 06c1937c..0a73b994 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
- markus@cvs.openbsd.org 2003/09/18 07:52:54
[sshconnect.c]
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
20030922
- (dtucker) [Makefile.in] Bug #644: Fix "make clean" for out-of-tree
@@ -1168,4 +1171,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.2994.2.28 2003/09/23 08:49:28 dtucker Exp $
+$Id: ChangeLog,v 1.2994.2.29 2003/09/23 08:55:43 dtucker Exp $
diff --git a/buffer.c b/buffer.c
index aee293f8..a80880bb 100644
--- a/buffer.c
+++ b/buffer.c
@@ -12,7 +12,7 @@
*/
#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 "buffer.h"
@@ -39,6 +39,7 @@ buffer_free(Buffer *buffer)
{
if (buffer->alloc > 0) {
memset(buffer->buf, 0, buffer->alloc);
+ buffer->alloc = 0;
xfree(buffer->buf);
}
}