diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2009-12-25 19:40:22 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2009-12-25 19:40:22 +0000 |
commit | e82905170473b809edef909a1234cec29b001098 (patch) | |
tree | 8edadbd9e4a94f68029f2ff1ae67cf80e518b285 /usr.bin/ssh/ssh-keyscan.c | |
parent | 3fa5f492093beb69c157032489f6a0d6f5d3df46 (diff) |
validate routing domain is in range 0-RT_TABLEID_MAX.
'Looks right' deraadt@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 8f581ba78ff..d5c5a42a39c 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/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>. * @@ -789,9 +789,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: |