torture/t_stringoverflow.c

説明を見る。
00001 #include "includes.h"
00002 
00003  int main(void)
00004 {
00005         fstring dest;
00006         char *ptr = dest;
00007 
00008         printf("running on valgrind? %d\n", RUNNING_ON_VALGRIND);
00009 
00010         /* Try copying a string into an fstring buffer.  The string
00011          * will actually fit, but this is still wrong because you
00012          * can't pstrcpy into an fstring.  This should trap in a
00013          * developer build. */
00014 
00015 #if 0
00016         /* As of CVS 20030318, this will be trapped at compile time! */
00017         pstrcpy(dest, "hello");
00018 #endif /* 0 */
00019 
00020         pstrcpy(ptr, "hello!");
00021 
00022         return 0;
00023 }

Sambaに対してSat Aug 29 21:23:27 2009に生成されました。  doxygen 1.4.7