summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-07-26 19:14:58 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-07-26 19:14:58 +0000
commit68e119062b0b3f95d34d6aaa08cd35c74f6daea1 (patch)
tree7264f20f18812ea48ad7fd6cc3d81e2d1a43556b /usr.sbin/dhcpd
parent48b47de4040ce6463df01690107e4e2f4fd91386 (diff)
Fix buffer overflows in dhcpd and dhclient. Closes PR#4306.
ok henning@
Diffstat (limited to 'usr.sbin/dhcpd')
-rw-r--r--usr.sbin/dhcpd/conflex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/conflex.c b/usr.sbin/dhcpd/conflex.c
index 798badf9d60..b5d087395e3 100644
--- a/usr.sbin/dhcpd/conflex.c
+++ b/usr.sbin/dhcpd/conflex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conflex.c,v 1.4 2004/09/16 18:35:42 deraadt Exp $ */
+/* $OpenBSD: conflex.c,v 1.5 2005/07/26 19:14:57 krw Exp $ */
/* Lexical scanner for dhcpd config file... */
@@ -101,7 +101,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;
}