This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
- From: "jfardo at laurelnetworks dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 25 Apr 2006 21:40:23 -0000
- Subject: [Bug libc/2074] _IO_new_file_xsputn() in fileops.c not checking for EOF
- References: <20051220202817.2074.jfardo@laurelnetworks.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jfardo at laurelnetworks dot com 2006-04-25 21:40 -------
I don't have a specific test case any more. This would intermittently cause
problems when running 'rpm' to install a package on a file system
that was full. If the package being installed was just the right
size, rpm would seg fault.
The following change in fileops.c fixes the bug.
glibc/libio/fileops.c:
***************
*** 1371,1376 ****
--- 1371,1379 ----
if (do_write)
{
count = new_do_write (f, s, do_write);
+ if (count == EOF) {
+ count = 0;
+ }
to_do -= count;
if (count < do_write)
return n - to_do;
--
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.