This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
- From: "jur dot pauw at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 Dec 2009 13:12:46 -0000
- Subject: [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
- References: <20091211102154.11082.jur.pauw@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jur dot pauw at gmail dot com 2009-12-11 13:12 -------
(In reply to comment #1)
> ftell(3) needs a valid FILE pointer, not one already invalidated by fclose(3)
> call. For details see fclose(3) description that says: "any further access
to
> the stream results in undefined behaviour".
This implies that ftell its behaviour is not Posix compliant, see
http://www.opengroup.org/onlinepubs/009695399/functions/ftell.html
ERRORS
The ftell() [CX] and ftello() functions shall fail if:
[EBADF]
[CX] The file descriptor underlying stream is not an open file descriptor.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://sourceware.org/bugzilla/show_bug.cgi?id=11082
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.