mirror of
https://github.com/opnsense/src.git
synced 2026-04-20 21:59:20 -04:00
In getttyent(3), if /etc/ttys doesn't end in a newline, don't
freak out and keep trying to expand the buffer until realloc() fails. PR: 114398
This commit is contained in:
parent
eee55ebda9
commit
00a32d0ca9
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ getttyent()
|
|||
return (NULL);
|
||||
}
|
||||
/* extend buffer if line was too big, and retry */
|
||||
while (!index(p, '\n')) {
|
||||
while (!index(p, '\n') && !feof(tf)) {
|
||||
i = strlen(p);
|
||||
lbsize += MALLOCCHUNK;
|
||||
if ((p = realloc(line, lbsize)) == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue