summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-11-06 12:51:54 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-11-06 12:51:54 +0000
commitecb168b089a063fceab1c158c9867a95919bbf5a (patch)
treea87b827a3437c5d84032be5a91b80825ad499273
parent48dd503679f5b00a7cb75fb1993b9d64c6ff834a (diff)
Add format 't' to parse_decimal() for signed 64-bit
integers.
-rw-r--r--sbin/dhclient/parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index d3a7bbb5179..a9ea6f86e25 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.75 2017/10/23 13:15:57 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.76 2017/11/06 12:51:53 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -288,6 +288,11 @@ parse_decimal(FILE *cfile, unsigned char *buf, char fmt)
token = next_token(&val, cfile);
switch (fmt) {
+ case 't': /* Signed 64-bit integer. */
+ low = INT64_MIN;
+ high = INT64_MAX;
+ bytes = 8;
+ break;
case 'l': /* Signed 32-bit integer. */
low = INT32_MIN;
high = INT32_MAX;