WHATSNEW: Update changed parameters.
[Samba/gbeck.git] / source3 / torture / t_stringoverflow.c
blob17765e6a2ce585da812388da0c5147e7d4fd4552
1 #include "includes.h"
3 int main(void)
5 char dest[100];
6 char *ptr = dest;
8 printf("running on valgrind? %d\n", RUNNING_ON_VALGRIND);
10 /* Try copying a string into an fstring buffer. The string
11 * will actually fit, but this is still wrong because you
12 * can't pstrcpy into an fstring. This should trap in a
13 * developer build. */
15 #if 0
16 /* As of CVS 20030318, this will be trapped at compile time! */
17 pstrcpy(dest, "hello");
18 #endif /* 0 */
20 fstrcpy(ptr, "hello!");
22 return 0;