summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2009-01-22 10:02:34 +0000
committerdjm <djm@openbsd.org>2009-01-22 10:02:34 +0000
commita10ba8e0d42f8de2c7e5b81cac0336819d636310 (patch)
treecf85b99b29b096fb5939ba93f194d90b5b10dd35 /usr.bin/ssh/ssh.c
parentoops! I committed the wrong version of the Channel->path diff, (diff)
downloadwireguard-openbsd-a10ba8e0d42f8de2c7e5b81cac0336819d636310.tar.xz
wireguard-openbsd-a10ba8e0d42f8de2c7e5b81cac0336819d636310.zip
make a2port() return -1 when it encounters an invalid port number
rather than 0, which it will now treat as valid (needed for future work) adjust current consumers of a2port() to check its return value is <= 0, which in turn required some things to be converted from u_short => int make use of int vs. u_short consistent in some other places too feedback & ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index a20d156bbe7..912ff5e54dd 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.322 2008/11/01 17:40:33 stevesk Exp $ */
+/* $OpenBSD: ssh.c,v 1.323 2009/01/22 10:02:34 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -430,7 +430,7 @@ main(int ac, char **av)
break;
case 'p':
options.port = a2port(optarg);
- if (options.port == 0) {
+ if (options.port <= 0) {
fprintf(stderr, "Bad port '%s'\n", optarg);
exit(255);
}