Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ssh bring more fixes from 3.7.1
details: https://anonhg.NetBSD.org/src/rev/5c143d6b72f9
branches: trunk
changeset: 552048:5c143d6b72f9
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 16 23:16:59 2003 +0000
description:
bring more fixes from 3.7.1
diffstat:
crypto/dist/ssh/buffer.c | 13 +++++++++----
crypto/dist/ssh/channels.c | 9 +++++----
crypto/dist/ssh/version.h | 8 ++++----
3 files changed, 18 insertions(+), 12 deletions(-)
diffs (94 lines):
diff -r 85e32bdd106a -r 5c143d6b72f9 crypto/dist/ssh/buffer.c
--- a/crypto/dist/ssh/buffer.c Tue Sep 16 21:56:00 2003 +0000
+++ b/crypto/dist/ssh/buffer.c Tue Sep 16 23:16:59 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buffer.c,v 1.3 2003/09/16 13:22:57 christos Exp $ */
+/* $NetBSD: buffer.c,v 1.4 2003/09/16 23:16:59 christos Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -14,7 +14,7 @@
#include "includes.h"
RCSID("$OpenBSD: buffer.c,v 1.16 2002/06/26 08:54:18 markus Exp $");
-__RCSID("$NetBSD: buffer.c,v 1.3 2003/09/16 13:22:57 christos Exp $");
+__RCSID("$NetBSD: buffer.c,v 1.4 2003/09/16 23:16:59 christos Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -25,8 +25,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;
}
@@ -36,9 +39,11 @@
void
buffer_free(Buffer *buffer)
{
+ if (buffer->alloc > 0) {
memset(buffer->buf, 0, buffer->alloc);
xfree(buffer->buf);
}
+}
/*
* Clears any data from the buffer, making it empty. This does not actually
diff -r 85e32bdd106a -r 5c143d6b72f9 crypto/dist/ssh/channels.c
--- a/crypto/dist/ssh/channels.c Tue Sep 16 21:56:00 2003 +0000
+++ b/crypto/dist/ssh/channels.c Tue Sep 16 23:16:59 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: channels.c,v 1.29 2003/07/10 01:09:43 lukem Exp $ */
+/* $NetBSD: channels.c,v 1.30 2003/09/16 23:16:59 christos Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -41,7 +41,7 @@
#include "includes.h"
RCSID("$OpenBSD: channels.c,v 1.187 2003/03/05 22:33:43 markus Exp $");
-__RCSID("$NetBSD: channels.c,v 1.29 2003/07/10 01:09:43 lukem Exp $");
+__RCSID("$NetBSD: channels.c,v 1.30 2003/09/16 23:16:59 christos Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -231,12 +231,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;
}
diff -r 85e32bdd106a -r 5c143d6b72f9 crypto/dist/ssh/version.h
--- a/crypto/dist/ssh/version.h Tue Sep 16 21:56:00 2003 +0000
+++ b/crypto/dist/ssh/version.h Tue Sep 16 23:16:59 2003 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: version.h,v 1.29 2003/09/16 17:39:32 lukem Exp $ */
-/* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */
+/* $NetBSD: version.h,v 1.30 2003/09/16 23:17:00 christos Exp $ */
+/* $OpenBSD: version.h,v 1.39 2003/09/16 21:02:40 markus Exp $ */
-#define __OPENSSH_VERSION "OpenSSH_3.6.1"
-#define __NETBSDSSH_VERSION "NetBSD_Secure_Shell-20030916"
+#define SSH_VERSION "OpenSSH_3.7.1"
+#define __NETBSDSSH_VERSION "NetBSD_Secure_Shell-20030916a"
/*
* it is important to retain OpenSSH version identification part, it is
Home |
Main Index |
Thread Index |
Old Index