diff options
author | Paul Jakma <paul.jakma@sun.com> | 2008-05-29 20:29:16 +0200 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2008-05-29 20:29:16 +0200 |
commit | 0d6b2ee249e9efba30da3236c413bf03c7b27ed9 (patch) | |
tree | 4d9320f2c34f0c127b58b92f59e2c2afd2d5818f /zebra/main.c | |
parent | [zebra/linux] Use BPF to filter out responses, to try avoid netlink overruns (diff) | |
download | frr-0d6b2ee249e9efba30da3236c413bf03c7b27ed9.tar.xz frr-0d6b2ee249e9efba30da3236c413bf03c7b27ed9.zip |
[daemons] Sanity check port number arguments before use
2008-05-29 Martin Nagy <mnagy@redhat.com>
* */*main.c: Sanity check port numbers before using.
Diffstat (limited to 'zebra/main.c')
-rw-r--r-- | zebra/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/main.c b/zebra/main.c index 6019260fe..61750f1d0 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -275,7 +275,8 @@ main (int argc, char **argv) break; } vty_port = atoi (optarg); - vty_port = (vty_port ? vty_port : ZEBRA_VTY_PORT); + if (vty_port <= 0 || vty_port > 0xffff) + vty_port = ZEBRA_VTY_PORT; break; case 'r': retain_mode = 1; |