summaryrefslogtreecommitdiff
path: root/tests/test_fwrite_overwrite_static.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_fwrite_overwrite_static.c')
-rw-r--r--tests/test_fwrite_overwrite_static.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_fwrite_overwrite_static.c b/tests/test_fwrite_overwrite_static.c
new file mode 100644
index 0000000..445b30d
--- /dev/null
+++ b/tests/test_fwrite_overwrite_static.c
@@ -0,0 +1,17 @@
1#include "common.h"
2
3#include <assert.h>
4#include <stdio.h>
5
6int main(int argc, char** argv) {
7 char buffer[12] = {0};
8
9 assert((sizeof(buffer) - 2) * 10 > sizeof(buffer));
10
11 CHK_FAIL_START
12 fwrite(buffer, sizeof(buffer) - 2, 10, stdin);
13 CHK_FAIL_END
14
15 puts(buffer);
16 return ret;
17}