You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen this code part in the past, so I was fairly sure that this limitation still exists. And I think it should not be just replaced with getline without thinking about possible consequences of programs which use libeconf. Linux-PAM for example trusted in some parts of the code that parsed lines wouldn't be longer (imagine strcpy usages, for an over-simplified example).
The text was updated successfully, but these errors were encountered:
This is a follow-up of a discussion at Linux-PAM about differences in line parsers. Linux-PAM supports arbitrary line lengths now.
According to @thkukuk in comment linux-pam/linux-pam#741 (comment) this should be true for libeconf, too.
See this proof of concept that BUFSIZ has consequences on line parser:
python -c 'print(8200*"a" + "=b")' > test.txt
pam_env.so
does)The output will be:
It shows that this one line is split into two. See https://github.com/openSUSE/libeconf/blob/master/lib/getfilecontents.c#L268 for relevant
fgets
usage.I've seen this code part in the past, so I was fairly sure that this limitation still exists. And I think it should not be just replaced with
getline
without thinking about possible consequences of programs which use libeconf. Linux-PAM for example trusted in some parts of the code that parsed lines wouldn't be longer (imagine strcpy usages, for an over-simplified example).The text was updated successfully, but these errors were encountered: