[Bug stdio/23636] BZ 1190 Make EOF sticky in stdio CUPS print jobs hang at processing
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Wed Sep 12 08:47:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=23636
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=1190
Flags| |security-
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
While double-checking whether we reset _IO_EOF_SEEN in the required places, I
found this:
fp->_IO_read_end += count;
if (count == 0)
{
/* If a stream is read to EOF, the calling application may switch active
handles. As a result, our offset cache would no longer be valid, so
unset it. */
fp->_offset = _IO_pos_BAD;
return EOF;
}
So there was once an expectation that you replace the underlying descriptor
(with dup2) after reaching EOF, and this is what cups-filters is doing.
Unfortunately, this extension breaks POSIX compliance in other cases (bug
1190).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list