summaryrefslogtreecommitdiff
path: root/security/openssh+gssapi/patches
diff options
context:
space:
mode:
authorjwise <jwise>2003-09-17 14:27:03 +0000
committerjwise <jwise>2003-09-17 14:27:03 +0000
commit42df2d0c2bdbb452c84a4be560618e15259faf11 (patch)
tree5e2775da46695a8c0f807ade0b3766c7cc179034 /security/openssh+gssapi/patches
parent50b5921e61e19c72e49692db25ca6fca7c0ac20a (diff)
downloadpkgsrc-42df2d0c2bdbb452c84a4be560618e15259faf11.tar.gz
Update for _new_ new OpenSSH patch, bump pkgrevision.
``Oops, they did it again.''
Diffstat (limited to 'security/openssh+gssapi/patches')
-rw-r--r--security/openssh+gssapi/patches/patch-ai46
-rw-r--r--security/openssh+gssapi/patches/patch-aj26
2 files changed, 66 insertions, 6 deletions
diff --git a/security/openssh+gssapi/patches/patch-ai b/security/openssh+gssapi/patches/patch-ai
index b1a87e07ffb..7c5b86be082 100644
--- a/security/openssh+gssapi/patches/patch-ai
+++ b/security/openssh+gssapi/patches/patch-ai
@@ -1,6 +1,40 @@
---- buffer.c.orig 2003-09-16 13:45:48.000000000 -0400
-+++ buffer.c 2003-09-16 13:50:49.000000000 -0400
-@@ -69,6 +69,7 @@
+$NetBSD: patch-ai,v 1.2 2003/09/17 14:27:07 jwise Exp $
+Index: buffer.c
+===================================================================
+RCS file: /cvs/src/usr.bin/ssh/buffer.c,v
+retrieving revision 1.16
+retrieving revision 1.18
+diff -u -r1.16 -r1.18
+--- buffer.c 26 Jun 2002 08:54:18 -0000 1.16
++++ buffer.c 16 Sep 2003 21:02:39 -0000 1.18
+@@ -23,8 +23,11 @@
+ void
+ buffer_init(Buffer *buffer)
+ {
+- buffer->alloc = 4096;
+- buffer->buf = xmalloc(buffer->alloc);
++ const u_int len = 4096;
++
++ buffer->alloc = 0;
++ buffer->buf = xmalloc(len);
++ buffer->alloc = len;
+ buffer->offset = 0;
+ buffer->end = 0;
+ }
+@@ -34,8 +37,10 @@
+ void
+ buffer_free(Buffer *buffer)
+ {
+- memset(buffer->buf, 0, buffer->alloc);
+- xfree(buffer->buf);
++ if (buffer->alloc > 0) {
++ memset(buffer->buf, 0, buffer->alloc);
++ xfree(buffer->buf);
++ }
+ }
+
+ /*
+@@ -69,6 +74,7 @@
void *
buffer_append_space(Buffer *buffer, u_int len)
{
@@ -8,19 +42,19 @@
void *p;
if (len > 0x100000)
-@@ -98,11 +99,13 @@
+@@ -98,11 +104,13 @@
goto restart;
}
/* Increase the size of the buffer and retry. */
- buffer->alloc += len + 32768;
- if (buffer->alloc > 0xa00000)
-+
++
+ newlen = buffer->alloc + len + 32768;
+ if (newlen > 0xa00000)
fatal("buffer_append_space: alloc %u not supported",
- buffer->alloc);
- buffer->buf = xrealloc(buffer->buf, buffer->alloc);
-+ newlen);
++ newlen);
+ buffer->buf = xrealloc(buffer->buf, newlen);
+ buffer->alloc = newlen;
goto restart;
diff --git a/security/openssh+gssapi/patches/patch-aj b/security/openssh+gssapi/patches/patch-aj
new file mode 100644
index 00000000000..decfa9b91fa
--- /dev/null
+++ b/security/openssh+gssapi/patches/patch-aj
@@ -0,0 +1,26 @@
+$NetBSD: patch-aj,v 1.1 2003/09/17 14:27:07 jwise Exp $
+Index: channels.c
+===================================================================
+RCS file: /cvs/src/usr.bin/ssh/channels.c,v
+retrieving revision 1.194
+retrieving revision 1.195
+diff -u -r1.194 -r1.195
+--- channels.c 29 Aug 2003 10:04:36 -0000 1.194
++++ channels.c 16 Sep 2003 21:02:40 -0000 1.195
+@@ -228,12 +228,13 @@
+ if (found == -1) {
+ /* There are no free slots. Take last+1 slot and expand the array. */
+ found = channels_alloc;
+- channels_alloc += 10;
+ if (channels_alloc > 10000)
+ fatal("channel_new: internal error: channels_alloc %d "
+ "too big.", channels_alloc);
++ channels = xrealloc(channels,
++ (channels_alloc + 10) * sizeof(Channel *));
++ channels_alloc += 10;
+ debug2("channel: expanding %d", channels_alloc);
+- channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
+ for (i = found; i < channels_alloc; i++)
+ channels[i] = NULL;
+ }
+