]> andersk Git - splint.git/blob - test/nullterminatedtest/test3.c
Pushed back constraintResolve.c to the previous version.
[splint.git] / test / nullterminatedtest / test3.c
1 #include <stdio.h>
2
3 //void free (char * bob);
4
5  /*@nullterminated@*/ char * strcpy ( char * ch1, /*@nullterminated@*/ 
6 char  * ch2);
7
8 char * global;
9
10 void test2 ()
11 {
12 char * y;
13 char * x;
14 strcpy (y, x);
15
16 strcpy (y, "bob");
17 x = "bob";
18 strcpy (y, x);
19 strcpy (y, global);
20 }
21
22
23
24  /*@nullterminated@*/ char * tr ( char  * e) {
25
26 /*@nullterminated@*/ char * c;
27
28 return (e);
29 }
30
31 int main ()
32 {
33 /*@nullterminated@*/ char * d;
34 d = tr(d);
35 tr(d);
36 free (d);
37 return 0;
38  
39 }
40
This page took 0.051094 seconds and 5 git commands to generate.