summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2009-01-06 00:51:24 +0000
committerShawn Routhier <sar@isc.org>2009-01-06 00:51:24 +0000
commitecb2f312ba4c6372831ff66c9924f68b067cf18d (patch)
treeabf0e3a7540cdb656e3f83676395f2a915a3f0cb /client
parenta2477d70b060adfdf3383e2bd94615b017c2bfb6 (diff)
downloadisc-dhcp-ecb2f312ba4c6372831ff66c9924f68b067cf18d.tar.gz
Validate argument to port option - bug 18695
Diffstat (limited to 'client')
-rw-r--r--client/dhclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/dhclient.c b/client/dhclient.c
index 3180d0ad..867eaa9a 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -32,7 +32,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.143.2.10 2008/06/11 20:20:31 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.143.2.11 2009/01/06 00:51:24 sar Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -151,7 +151,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-p")) {
if (++i == argc)
usage ();
- local_port = htons (atoi (argv [i]));
+ local_port = validate_port (argv [i]);
log_debug ("binding to user-specified port %d",
ntohs (local_port));
} else if (!strcmp (argv [i], "-d")) {