about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorAaron Merey <amerey@redhat.com>2024-08-29 12:02:25 -0400
committerAaron Merey <amerey@redhat.com>2024-09-05 09:55:27 -0400
commit3e4a01870ef9605ccf6475215a4b32aa86d5d206 (patch)
treee5355a5ecf5d6bdaea6a47b68bb458ccaf887cc6 /sysdeps/ieee754
parent9c0d6f7a1046aba111e25e34ec07242853e859dc (diff)
downloadglibc-3e4a01870ef9605ccf6475215a4b32aa86d5d206.tar.gz
glibc-3e4a01870ef9605ccf6475215a4b32aa86d5d206.tar.xz
glibc-3e4a01870ef9605ccf6475215a4b32aa86d5d206.zip
Test fclose on an unopened file.
Add new file libio/tst-fclosed-unopened.c that tests whether fclose on
an unopened file returns EOF.

Calling fclose on unopened files normally causes a use-after-free bug,
however the standard streams are an exception since they are not
deallocated by fclose.

fclose returning EOF for unopened files is not part of the external
contract but there are dependancies on this behaviour.  For example,
gnulib's close_stdout in lib/closeout.c.

Tested for x86_64.

Signed-off-by: Aaron Merey <amerey@redhat.com>
Diffstat (limited to 'sysdeps/ieee754')
0 files changed, 0 insertions, 0 deletions