aboutsummaryrefslogtreecommitdiff
path: root/sbin/dhclient/conflex.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dhclient/conflex.c')
-rw-r--r--sbin/dhclient/conflex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/conflex.c b/sbin/dhclient/conflex.c
index ee96bfeb9ca0..3c8932dbd5b2 100644
--- a/sbin/dhclient/conflex.c
+++ b/sbin/dhclient/conflex.c
@@ -40,6 +40,9 @@
* Enterprises, see ``http://www.vix.com''.
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
#include <ctype.h>
#include "dhcpd.h"
@@ -101,7 +104,7 @@ get_char(FILE *cfile)
lpos = 1;
cur_line[0] = 0;
} else if (c != EOF) {
- if (lpos <= 81) {
+ if (lpos < sizeof(line1)) {
cur_line[lpos - 1] = c;
cur_line[lpos] = 0;
}
@@ -233,6 +236,7 @@ read_string(FILE *cfile)
}
if (bs) {
bs = 0;
+ i--;
tokbuf[i] = c;
} else if (c == '\\')
bs = 1;