This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nss_files: Fix re-reading of long lines [BZ #18991]


On 09/01/2017 05:43 PM, Florian Weimer wrote:
> +      ssize_t r = __libc_readline_unlocked
> +	(stream, data->linebuffer, linebuflen);

This fixes the line skipping due to an insufficient read buffer size.

However, if the line length is sufficiently close to the buffer size, so
that it does not leave enough room for the aliases pointer array, then
we can get a very late ERANGE error in the line parser.  This will still
result in a skipped line.  I think this means that bug 18991 is not a
regression, strictly speaking.

The test case actually catches this, but only 64-bit architectures, due
to the way the buffer sizes work out.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]