summaryrefslogtreecommitdiffstats
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-01-28 16:30:33 +1100
committerDamien Miller <djm@mindrot.org>2009-01-28 16:30:33 +1100
commit9576ac4afc7124415183dd9fe73d410165dbfe82 (patch)
tree889405ac745d9c999a324992dc6eb5f76a395337 /channels.c
parenta1c1b6c86d506c10daac0161f7fc56368cc6ef6e (diff)
- djm@cvs.openbsd.org 2009/01/22 09:49:57
[channels.c] oops! I committed the wrong version of the Channel->path diff, it was missing some tweaks suggested by stevesk@
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index e6c08b62..0b1c34c8 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.293 2009/01/22 09:46:01 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.294 2009/01/22 09:49:57 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1181,7 +1181,7 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
c->path = NULL;
}
if (s5_req.atyp == SSH_SOCKS5_DOMAIN) {
- if (addrlen > NI_MAXHOST - 1) {
+ if (addrlen >= NI_MAXHOST) {
error("channel %d: dynamic request: socks5 hostname "
"\"%.100s\" too long", c->self, dest_addr);
return -1;
@@ -2477,7 +2477,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
error("No forward host name.");
return 0;
}
- if (strlen(host) > NI_MAXHOST) {
+ if (strlen(host) >= NI_MAXHOST) {
error("Forward host name too long.");
return 0;
}