summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/conflex.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-08-24 00:05:04 +0000
committerbrooks <brooks@FreeBSD.org>2005-08-24 00:05:04 +0000
commit09bbc99b5a768984ec43bc7dc4680a8a9f2311f9 (patch)
treeecdd5668649acf5a0ba1be7f4c1bfe1e176ada73 /sbin/dhclient/conflex.c
parentb9c30d0c5778ea1344208e8706c502aa02ab54e8 (diff)
downloadFreeBSD-src-09bbc99b5a768984ec43bc7dc4680a8a9f2311f9.zip
FreeBSD-src-09bbc99b5a768984ec43bc7dc4680a8a9f2311f9.tar.gz
MFOpenBSD rev 1.9: fix a buffer overflow when processing config file
lines that are exactly 81 characters in length. Obtained from: OpenBSD MFC After: 3 days
Diffstat (limited to 'sbin/dhclient/conflex.c')
-rw-r--r--sbin/dhclient/conflex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/dhclient/conflex.c b/sbin/dhclient/conflex.c
index 39409a9..c330191 100644
--- a/sbin/dhclient/conflex.c
+++ b/sbin/dhclient/conflex.c
@@ -104,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;
}
OpenPOWER on IntegriCloud