Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/crypto/dist/ssh more ssh-3.7.1 fixes
details: https://anonhg.NetBSD.org/src/rev/d2ac42418d03
branches: netbsd-1-6
changeset: 530718:d2ac42418d03
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 16 23:29:22 2003 +0000
description:
more ssh-3.7.1 fixes
diffstat:
crypto/dist/ssh/buffer.c | 11 ++++++++---
crypto/dist/ssh/channels.c | 7 ++++---
crypto/dist/ssh/version.h | 4 ++--
3 files changed, 14 insertions(+), 8 deletions(-)
diffs (74 lines):
diff -r 4cbabf7ee8e5 -r d2ac42418d03 crypto/dist/ssh/buffer.c
--- a/crypto/dist/ssh/buffer.c Tue Sep 16 19:36:34 2003 +0000
+++ b/crypto/dist/ssh/buffer.c Tue Sep 16 23:29:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: buffer.c,v 1.1.1.6.2.2 2003/09/16 17:57:56 grant Exp $ */
+/* $NetBSD: buffer.c,v 1.1.1.6.2.3 2003/09/16 23:29:22 christos Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -24,8 +24,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;
}
@@ -35,9 +38,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 4cbabf7ee8e5 -r d2ac42418d03 crypto/dist/ssh/channels.c
--- a/crypto/dist/ssh/channels.c Tue Sep 16 19:36:34 2003 +0000
+++ b/crypto/dist/ssh/channels.c Tue Sep 16 23:29:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: channels.c,v 1.21.2.1 2002/06/26 16:53:04 tv Exp $ */
+/* $NetBSD: channels.c,v 1.21.2.2 2003/09/16 23:29:23 christos Exp $ */
/*
* Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
* Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -230,12 +230,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 4cbabf7ee8e5 -r d2ac42418d03 crypto/dist/ssh/version.h
--- a/crypto/dist/ssh/version.h Tue Sep 16 19:36:34 2003 +0000
+++ b/crypto/dist/ssh/version.h Tue Sep 16 23:29:22 2003 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: version.h,v 1.23.2.3 2003/09/16 19:33:55 grant Exp $ */
+/* $NetBSD: version.h,v 1.23.2.4 2003/09/16 23:29:25 christos Exp $ */
/* $OpenBSD: version.h,v 1.34 2002/06/26 13:56:27 markus Exp $ */
#define __OPENSSH_VERSION "OpenSSH_3.4"
-#define __NETBSDSSH_VERSION "NetBSD_Secure_Shell-20030916"
+#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