summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
authordtucker <dtucker>2010-01-08 07:55:58 +0000
committerdtucker <dtucker>2010-01-08 07:55:58 +0000
commit6fca386a5f40867a221cbda513e612cc4da42b99 (patch)
tree970eac1bd081809d7ebb8d461a63ac00f3396a9e /ssh-keyscan.c
parentc5a6739afc411e19967276d57f6ad4510e47ad60 (diff)
downloadopenssh-6fca386a5f40867a221cbda513e612cc4da42b99.tar.gz
- stevesk@cvs.openbsd.org 2009/12/25 19:40:21
[readconf.c servconf.c misc.h ssh-keyscan.c misc.c] validate routing domain is in range 0-RT_TABLEID_MAX. 'Looks right' deraadt@
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index f30e8504..faeb9e13 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.79 2009/10/28 16:38:18 reyk Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.80 2009/12/25 19:40:21 stevesk Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
*
@@ -807,9 +807,11 @@ main(int argc, char **argv)
IPv4or6 = AF_INET6;
break;
case 'V':
- scan_rdomain = a2port(optarg);
- if (scan_rdomain < 0)
- scan_rdomain = -1;
+ scan_rdomain = a2rdomain(optarg);
+ if (scan_rdomain == -1) {
+ fprintf(stderr, "Bad rdomain '%s'\n", optarg);
+ exit(1);
+ }
break;
case '?':
default: