From e6ef806ef40a421435b1209f0f79d778c03fe04a Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 27 May 2024 13:04:16 -0400 Subject: handle use-after-close --- src/stdio/fflush.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stdio/fflush.c') 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"); } -- cgit v1.2.1