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/1190] fgetc()/fread() behaviour is not POSIX compliant


http://sourceware.org/bugzilla/show_bug.cgi?id=1190

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |bugdal at aerifal dot cx
         Resolution|WORKSFORME                  |

--- Comment #6 from Rich Felker <bugdal at aerifal dot cx> 2011-10-27 02:07:43 UTC ---
This bug still exists; I'm reopening it and adding a new attachment that
demonstrates it trivially. Actually I wrote this test-case a while back as a
demonstration of one of the very few safe uses of gets(), which happened to
become unsafe due to the bug in glibc.

To see the bug, run the program (stdio_eof.c) and press ^D (or whatever your
EOF key on the terminal is). The program should exit, but under glibc, the
gets() call waits for a line of input and prints it back before exiting.

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


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