public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
@ 2012-04-12 19:05 ` aj at suse dot de
2012-04-12 19:10 ` aj at suse dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: aj at suse dot de @ 2012-04-12 19:05 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=2074
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |aj at suse dot de
Resolution| |FIXED
--- Comment #12 from Andreas Jaeger <aj at suse dot de> 2012-04-12 19:05:39 UTC ---
The patch to the manual and also a corresponding change to libio.h has been put
into git now.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
2012-04-12 19:05 ` [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF aj at suse dot de
@ 2012-04-12 19:10 ` aj at suse dot de
2012-04-30 1:11 ` mtk.manpages at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: aj at suse dot de @ 2012-04-12 19:10 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=2074
--- Comment #13 from Andreas Jaeger <aj at suse dot de> 2012-04-12 19:09:46 UTC ---
I also filed Bug 13975 - fopencookie interface surprising.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
2012-04-12 19:05 ` [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF aj at suse dot de
2012-04-12 19:10 ` aj at suse dot de
@ 2012-04-30 1:11 ` mtk.manpages at gmail dot com
2014-02-16 18:25 ` jackie.rosen at hushmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: mtk.manpages at gmail dot com @ 2012-04-30 1:11 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=2074
Michael Kerrisk <mtk.manpages at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mtk.manpages at gmail dot
| |com
--- Comment #14 from Michael Kerrisk <mtk.manpages at gmail dot com> 2012-04-30 01:11:15 UTC ---
(In reply to comment #11)
> Created attachment 4777 [details]
> proposed patch
>
> Ok to commit?
I've committed a corresponding change to the fopencookie(3) man page.
@@ -158,7 +158,8 @@ As its function result, the
.I write
function should return the number of bytes copied from
.IR buf ,
-or \-1 on error.
+or 0 on error.
+(The function must not return a negative value.)
The
.I write
function should update the stream offset appropriately.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
` (2 preceding siblings ...)
2012-04-30 1:11 ` mtk.manpages at gmail dot com
@ 2014-02-16 18:25 ` jackie.rosen at hushmail dot com
2014-05-28 19:46 ` schwab at sourceware dot org
2014-06-13 14:41 ` fweimer at redhat dot com
5 siblings, 0 replies; 8+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 18:25 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=2074
Jackie Rosen <jackie.rosen at hushmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jackie.rosen at hushmail dot com
--- Comment #15 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
` (3 preceding siblings ...)
2014-02-16 18:25 ` jackie.rosen at hushmail dot com
@ 2014-05-28 19:46 ` schwab at sourceware dot org
2014-06-13 14:41 ` fweimer at redhat dot com
5 siblings, 0 replies; 8+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:46 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=2074
Andreas Schwab <schwab at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jackie.rosen at hushmail dot com |
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
` (4 preceding siblings ...)
2014-05-28 19:46 ` schwab at sourceware dot org
@ 2014-06-13 14:41 ` fweimer at redhat dot com
5 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 14:41 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=2074
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libc/2074] New: _IO_new_file_xsputn() in fileops.c not checking for EOF
@ 2005-12-20 20:28 jfardo at laurelnetworks dot com
2010-05-10 23:46 ` [Bug manual/2074] " pasky at suse dot cz
2010-05-11 0:51 ` pasky at suse dot cz
0 siblings, 2 replies; 8+ messages in thread
From: jfardo at laurelnetworks dot com @ 2005-12-20 20:28 UTC (permalink / raw)
To: glibc-bugs
In glibc 2.3.4, the function new_do_write() in libio/fileops.c returns an
unsigned
value (an _IO_size_t). If the underlying write system call in new_do_write()
returns EOF (-1), new_do_write() will return 0xffffffff rather than -1.
The function IO_new_file_xsputn() in libio/fileops.c appears to have
2 problems if the call to new_do_write() returns 0xffffffff. Here's
the specific snippet of code from IO_new_file_xsputn():
if (do_write)
{
count = new_do_write (f, s, do_write);
to_do -= count;
if (count < do_write)
return n - to_do;
}
/* Now write out the remainder. Normally, this will fit in the
buffer, but it's somewhat messier for line-buffered files,
so we let _IO_default_xsputn handle the general case. */
if (to_do)
to_do -= INTUSE(_IO_default_xsputn) (f, s+do_write, to_do);
}
return n - to_do;
If new_do_write() returns 0xffffffff, 'to_do' will actually
be incremented by 1. Also, since 'count' is an unsigned quantity,
the if statement 'if (count < do_write)' will evaluate to false,
and the code will incorrectly fall through to the call to
IO_default_xsputn().
--
Summary: _IO_new_file_xsputn() in fileops.c not checking for EOF
Product: glibc
Version: 2.3.4
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: jfardo at laurelnetworks dot com
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=2074
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-06-13 14:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-2074-131@http.sourceware.org/bugzilla/>
2012-04-12 19:05 ` [Bug manual/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF aj at suse dot de
2012-04-12 19:10 ` aj at suse dot de
2012-04-30 1:11 ` mtk.manpages at gmail dot com
2014-02-16 18:25 ` jackie.rosen at hushmail dot com
2014-05-28 19:46 ` schwab at sourceware dot org
2014-06-13 14:41 ` fweimer at redhat dot com
2005-12-20 20:28 [Bug libc/2074] New: " jfardo at laurelnetworks dot com
2010-05-10 23:46 ` [Bug manual/2074] " pasky at suse dot cz
2010-05-11 0:51 ` pasky at suse dot cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).