diff options
author | Aaron Merey <amerey@redhat.com> | 2024-09-19 09:53:23 -0400 |
---|---|---|
committer | Aaron Merey <amerey@redhat.com> | 2024-09-20 10:32:35 -0400 |
commit | 35dc62de3d5d73a91d4ca8fa9799b510a34d170d (patch) | |
tree | 6a6704266c489d3130929130e570a9aa392624cb /stdio-common/tst-printf-intn-main.c | |
parent | fa1b0d5e9f6e0353e16339430770a7a8824c0468 (diff) | |
download | glibc-35dc62de3d5d73a91d4ca8fa9799b510a34d170d.zip glibc-35dc62de3d5d73a91d4ca8fa9799b510a34d170d.tar.gz glibc-35dc62de3d5d73a91d4ca8fa9799b510a34d170d.tar.bz2 |
Add another test for fclose on an unopened file
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>
Diffstat (limited to 'stdio-common/tst-printf-intn-main.c')
0 files changed, 0 insertions, 0 deletions