From 26734c60a816952d94ec59a37fae029f4d2e6074 Mon Sep 17 00:00:00 2001 From: dinoex Date: Tue, 23 Sep 2003 19:16:49 +0000 Subject: - Security Fix obtained from OpenBSD http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/buffer.c.diff?r1=1.18&r2=1.19 Submitted by: ash@lab.poc.net --- security/openssh-portable/files/patch-buffer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'security/openssh-portable/files') diff --git a/security/openssh-portable/files/patch-buffer.c b/security/openssh-portable/files/patch-buffer.c index 093e83c586a3..3bb0201df46a 100644 --- a/security/openssh-portable/files/patch-buffer.c +++ b/security/openssh-portable/files/patch-buffer.c @@ -43,7 +43,7 @@ diff -u -r1.16 -r1.18 buffer->offset = 0; buffer->end = 0; } -@@ -34,8 +37,10 @@ +@@ -34,8 +37,11 @@ void buffer_free(Buffer *buffer) { @@ -51,12 +51,13 @@ diff -u -r1.16 -r1.18 - xfree(buffer->buf); + if (buffer->alloc > 0) { + memset(buffer->buf, 0, buffer->alloc); ++ buffer->alloc = 0; + xfree(buffer->buf); + } } /* -@@ -69,6 +74,7 @@ +@@ -69,6 +75,7 @@ void * buffer_append_space(Buffer *buffer, u_int len) { @@ -64,7 +65,7 @@ diff -u -r1.16 -r1.18 void *p; if (len > 0x100000) -@@ -98,11 +104,13 @@ +@@ -98,11 +105,13 @@ goto restart; } /* Increase the size of the buffer and retry. */ -- cgit