summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhcpd.h
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-10-12 13:10:14 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-10-12 13:10:14 +0000
commit2688db8de70a544047c6eb158bd59a4e9c5b8921 (patch)
treeb74c52f4b52291f371f1e40833a09e504cd2993f /sbin/dhclient/dhcpd.h
parente91d53fba5218ced592469f4d98a833669697541 (diff)
Make parse_string() toe the new line by returning
0 for failure, 1 for success, emitting a single error message ("expecting string.") and handling ';' better. Don't leak memory when encountering pathological config or lease files containing repeated instances of an option or command with string data.
Diffstat (limited to 'sbin/dhclient/dhcpd.h')
-rw-r--r--sbin/dhclient/dhcpd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index b6dfc022ac2..971b0fd540f 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.230 2017/10/11 15:06:27 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.231 2017/10/12 13:10:13 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -179,7 +179,7 @@ int peek_token(char **, FILE *);
/* parse.c */
void skip_to_semi(FILE *);
int parse_semi(FILE *);
-char *parse_string(FILE *, unsigned int *);
+int parse_string(FILE *, unsigned int *, char **);
int parse_ip_addr(FILE *, struct in_addr *);
int parse_cidr(FILE *, unsigned char *);
int parse_lease_time(FILE *, time_t *);