This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]