diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-30 21:16:51 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-05-30 21:16:51 +0000 |
commit | 06f4ac4c41ea5834371e4cd7f6554f8038654258 (patch) | |
tree | daf9fe1e4962aefb32858c267704eaac2cd88c65 | |
parent | 7ef86c9fbcbd7dc1d999e37e00fdf2529e81ce40 (diff) |
o timeout is int, not u_int32_t
o reject negative timeouts
ok jason@
-rw-r--r-- | sbin/brconfig/brconfig.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/brconfig/brconfig.c b/sbin/brconfig/brconfig.c index 6487c1d6a3e..fb801a02e48 100644 --- a/sbin/brconfig/brconfig.c +++ b/sbin/brconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.23 2002/12/18 16:10:27 markus Exp $ */ +/* $OpenBSD: brconfig.c,v 1.24 2003/05/30 21:16:50 henning Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -739,12 +739,12 @@ int bridge_timeout(int s, char *brdg, char *arg) { struct ifbrparam bp; - u_int32_t newtime; + int newtime; char *endptr; errno = 0; - newtime = strtoul(arg, &endptr, 0); - if (arg[0] == '\0' || endptr[0] != '\0' || + newtime = strtol(arg, &endptr, 0); + if (arg[0] == '\0' || endptr[0] != '\0' || newtime < 0 || (errno == ERANGE && newtime == ULONG_MAX)) { printf("invalid arg for timeout: %s\n", arg); return (EX_USAGE); |