summaryrefslogtreecommitdiff
path: root/src/stdio/fflush.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-05-27 13:04:16 -0400
committerJakob Kaivo <jkk@ung.org>2024-05-27 13:04:16 -0400
commite6ef806ef40a421435b1209f0f79d778c03fe04a (patch)
tree4a099e9cfe1084f24b990c833a97285c2b442990 /src/stdio/fflush.c
parent7d71ad2b8589bef1bdf26c3cfec5ab99b6bba3b9 (diff)
handle use-after-close
Diffstat (limited to 'src/stdio/fflush.c')
-rw-r--r--src/stdio/fflush.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c
index a653e0d1..6c1e78f5 100644
--- a/src/stdio/fflush.c
+++ b/src/stdio/fflush.c
@@ -27,6 +27,8 @@ int fflush(FILE *stream)
return 0;
}
+ ASSERT_STREAM(stream, 0, 0);
+
if (!stream->write) {
UNDEFINED("attempt to fflush() an input stream");
}