diff options
author | 2009-01-22 09:49:57 +0000 | |
---|---|---|
committer | 2009-01-22 09:49:57 +0000 | |
commit | 47af1d3b3a35597186d8c15525bdcf87016366cc (patch) | |
tree | 5b6e8ee6718e69a9dffadf85ba6fba18717c2b6d | |
parent | make Channel->path an allocated string, saving a few bytes here and (diff) | |
download | wireguard-openbsd-47af1d3b3a35597186d8c15525bdcf87016366cc.tar.xz wireguard-openbsd-47af1d3b3a35597186d8c15525bdcf87016366cc.zip |
oops! I committed the wrong version of the Channel->path diff,
it was missing some tweaks suggested by stevesk@
-rw-r--r-- | usr.bin/ssh/channels.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index d01ff5620d7..1791f478c8b 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/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 @@ -1176,7 +1176,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; @@ -2455,7 +2455,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; } |