mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-18 08:51:06 +00:00
35dc62de3d
Add new file libio/tst-fclose-unopened2.c that tests whether fclose on an unopened file returns EOF. This test differs from tst-fclose-unopened.c by ensuring the file's buffer is allocated prior to double-fclose. A comment in tst-fclose-unopened.c now clarifies that it is testing a file with an unallocated buffer. 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. Tested for x86_64. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2 lines
7 B
Plaintext
2 lines
7 B
Plaintext
fclose
|