]> andersk Git - splint.git/blob - test/tainted.expect
noexpand always false.
[splint.git] / test / tainted.expect
1
2 tainted.c: (in function f)
3 tainted.c:5:20: Invalid transfer from tainted s to untainted (Possibly tainted
4                    storage used as untainted.): f(..., s, ...)
5    tainted.c:3:48: s becomes tainted
6    tainted.c:3:74: us becomes untainted
7 tainted.c: (in function test)
8 tainted.c:12:18: Invalid transfer from tainted s to untainted (Possibly tainted
9                     storage used as untainted.): system(..., s, ...)
10    tainted.c:9:34: s becomes tainted
11    tainted.xh:26:55: s becomes untainted
12 tainted.c:17:18: Invalid transfer from tainted t to untainted (Possibly tainted
13                     storage used as untainted.): system(..., t, ...)
14    tainted.c:15:3: t becomes tainted
15    tainted.xh:26:55: s becomes untainted
16 tainted.c:20:18: Invalid transfer from tainted t to untainted (Possibly tainted
17                     storage used as untainted.): system(..., t, ...)
18    tainted.c:19:3: t becomes tainted
19    tainted.xh:26:55: s becomes untainted
20
21 Finished checking --- 4 code warnings, as expected
22
23 tainted-bad.mts:18:7: Transfer clause uses unrecognized result state peach:
24                          untainted as tainted ==> peach
25 tainted-bad.mts:14:17: Merge clause uses unrecognized second value junky:
26                           tainted X junky ==> error "Splat!"
27 tainted-bad.mts:11:7: Annotation declaration uses unrecognized value name blue:
28                          maybetainted reference ==> blue
29 tainted-bad.mts:5:21: Defaults declaration uses unrecognized value name
30                          stainted: stainted reference
31 tainted-bad.mts:7:21: Duplicate defaults declaration for context parameter:
32                          untainted parameter
33 tainted.c: (in function f)
34 tainted.c:5:20: Invalid transfer from tainted s to untainted (Possibly tainted
35                    storage used as untainted.): f(..., s, ...)
36    tainted.c:3:48: s becomes tainted
37    tainted.c:3:74: us becomes untainted
38 tainted.c: (in function test)
39 tainted.c:12:18: Invalid transfer from tainted s to untainted (Possibly tainted
40                     storage used as untainted.): system(..., s, ...)
41    tainted.c:9:34: s becomes tainted
42    tainted.xh:26:55: s becomes untainted
43 tainted.c:17:18: Invalid transfer from tainted t to untainted (Possibly tainted
44                     storage used as untainted.): system(..., t, ...)
45    tainted.c:15:3: t becomes tainted
46    tainted.xh:26:55: s becomes untainted
47 tainted.c:20:18: Invalid transfer from tainted t to untainted (Possibly tainted
48                     storage used as untainted.): system(..., t, ...)
49    tainted.c:15:3: t becomes tainted
50    tainted.xh:26:55: s becomes untainted
51
52 Finished checking --- 9 code warnings, as expected
53
54 tainted2.c: (in function test)
55 tainted2.c:20:10: Invalid transfer from tainted stk to untainted (Possibly
56                      tainted storage used as untainted.): return stk
57    tainted2.c:17:14: stk becomes tainted
58    tainted2.c:4:2: becomes untainted
59
60 Finished checking --- 1 code warning, as expected
61
62 tainted3.c: (in function test)
63 tainted3.c:7:19: Invalid transfer from tainted def to untainted (Possibly
64     tainted storage used as untainted.): checkUntainted(..., def, ...)
65    tainted3.c:4:36: def becomes tainted
66    tainted3.c:1:53: def becomes untainted
67
68 Finished checking --- 1 code warning, as expected
69
70 tainted4.c: (in function test)
71 tainted4.c:9:19: Invalid transfer from tainted def to untainted (*def):
72                     Possibly tainted storage used as untainted.
73    tainted4.c:6:36: def becomes tainted
74
75 Finished checking --- 1 code warning, as expected
76
77 Finished checking --- no warnings
78
79 taintedmerge.c: (in function f)
80 taintedmerge.c:11:18: Invalid transfer from tainted t to untainted (Possibly
81     tainted storage used as untainted.): system(..., t, ...)
82    taintedmerge.c:10:3: t becomes tainted
83    tainted.xh:26:55: s becomes untainted
84 taintedmerge.c:14:18: Invalid transfer from tainted t to untainted (Possibly
85     tainted storage used as untainted.): system(..., t, ...)
86    taintedmerge.c:13:3: t becomes tainted
87    tainted.xh:26:55: s becomes untainted
88 taintedmerge.c:16:10: Stack-allocated storage t reachable from return value: t
89
90 Finished checking --- 3 code warnings, as expected
91
92 taintedimplicit.c: (in function dangerouscall)
93 taintedimplicit.c:17:18: Invalid transfer from tainted [result of taintme] to
94     untainted (Possibly tainted storage used as untainted.):
95     system(..., taintme(s), ...)
96    taintedimplicit.c:17:18: becomes tainted
97    tainted.xh:26:55: s becomes untainted
98
99 Finished checking --- 1 code warning, as expected
100
101 sprintf.c: (in function sp)
102 sprintf.c:7:3: Buffer overflow possible with sprintf.  Recommend using snprintf
103                   instead: sprintf
104 sprintf.c:10:3: Buffer overflow possible with sprintf.  Recommend using
105                    snprintf instead: sprintf
106 sprintf.c:11:18: Invalid transfer from tainted s to untainted (Possibly tainted
107                     storage used as untainted.): system(..., s, ...)
108    sprintf.c:10:37: s becomes tainted
109    tainted.xh:26:55: s1 becomes untainted
110 sprintf.c:13:3: Buffer overflow possible with sprintf.  Recommend using
111                    snprintf instead: sprintf
112 sprintf.c:14:18: Invalid transfer from tainted s to untainted (Possibly tainted
113                     storage used as untainted.): system(..., s, ...)
114    sprintf.c:13:61: s becomes tainted
115    tainted.xh:26:55: s1 becomes untainted
116
117 Finished checking --- 5 code warnings, as expected
This page took 0.295013 seconds and 5 git commands to generate.