1:代码
1 #include <string.h>
2
3 void test3()
4 {
5 int which = 0;
6
7 char acBuf[12];
8 if ( 0 == which)
9 memcpy(acBuf, "123456", 10);
10 else
11 strcpy(0, "abcdefg");
12 }
13
14 void test2()
15 {
16 test3();
17 }
18
19 void test1()
20 {
21 test2();
22 }
23
24 int main(int argc, char** argv)
25 {
26 test1();
27 return 0;
28 }
2:调试