Bug 13114 - fopen ("non-existing-file", "re") gives wrong errno
Summary: fopen ("non-existing-file", "re") gives wrong errno
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.14
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 13:19 UTC by Andreas Jaeger
Modified: 2014-06-27 12:24 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
test case for fopen bug (183 bytes, text/x-csrc)
2011-08-19 13:19 UTC, Andreas Jaeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2011-08-19 13:19:23 UTC
Created attachment 5906 [details]
test case for fopen bug

The test program returns on glibc 2.14 - but not on 2.11 - a wrong errno. It should return ENOENT but returns EBADF.
Comment 1 Andreas Jaeger 2011-08-19 13:48:41 UTC
Patch sent:
http://sourceware.org/ml/libc-hacker/2011-08/msg00010.html
Comment 2 Ulrich Drepper 2011-08-20 13:22:59 UTC
I checked in a patch.