xref: /openbsd-src/regress/gnu/egcs/gcc-bounds/snprintf-4.cpp (revision 90140cc77530394257461d70793f677369d809d3)
1 #include <stdio.h>
2 
3 #if defined(__LP64__)
4 #define	DUMMYSIZE	104
5 #else
6 #define	DUMMYSIZE	100
7 #endif
8 
main(int argc,char ** argv)9 int main(int argc, char **argv) {
10 	char *buf;
11 	char buf2[10];
12 	snprintf(buf2, -sizeof(buf) + DUMMYSIZE, "%s", "foo");
13 	return 1;
14 }
15