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
This commit is contained in:
parent
8794fdbb48
commit
1469b42c7d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user