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: "John dot Fardo at ecitele dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 Aug 2006 17:43:15 -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 John dot Fardo at ecitele dot com 2006-08-29 17:43 -------
Subject: RE: _IO_new_file_xsputn() in fileops.c not checking for EOF
_IO_cookie_write() in iofopncook.c looks like it can return -1.
Also, this problem was observed when running rpm -
rpm uses fopencookie().
Code from iofopncook.c:
static _IO_ssize_t
_IO_cookie_write (fp, buf, size)
_IO_FILE *fp;
const void *buf;
_IO_ssize_t size;
{
struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
if (cfile->__io_functions.write == NULL)
return -1;
return cfile->__io_functions.write (cfile->__cookie, buf, size);
}
- John Fardo
> -----Original Message-----
> From: jakub at redhat dot com
> [mailto:sourceware-bugzilla@sourceware.org]
> Sent: Tuesday, August 29, 2006 11:34 AM
> To: John Fardo
> Subject: [Bug libc/2074] _IO_new_file_xsputn() in fileops.c
> not checking for EOF
>
>
> ------- Additional Comments From jakub at redhat dot com
> 2006-08-29 15:34 ------- So you are just guessing what is it?
> Can't you instead grep the code?
> find libc -name \*.[ch] | xargs grep 'JUMP_INIT[[:blank:]]*(write'
> shows the functions and none of them return EOF.
>
> --
>
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=2074
>
> ------- You are receiving this mail because: ------- You
> reported the bug, or are watching the reporter.
>
>
--
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.