2022-05-31 07:29:27 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2024-01-30 17:25:44 +00:00
|
|
|
#include <unistd.h>
|
2022-05-31 07:29:27 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
char str[8192+2048];
|
|
|
|
memset (str, 'A', sizeof (str) - 1);
|
|
|
|
str[sizeof (str) - 1] = '\0';
|
|
|
|
FILE *f = fopen ("abcd", "w");
|
|
|
|
setvbuf (f, NULL, _IONBF, 0);
|
|
|
|
/* Force error on next overflow. */
|
|
|
|
close (fileno (f));
|
|
|
|
fprintf (f, "%s\n", str);
|
|
|
|
return 0;
|
|
|
|
}
|