]> andersk Git - splint.git/blob - test/moreBufferTests.expect
Made allocations involving sizeof work correctly (test/malloc.c).
[splint.git] / test / moreBufferTests.expect
1
2 unrecogCall.c: (in function foo)
3 unrecogCall.c:8:3: Unrecognized identifier: bar
4 initialization.c: (in function initialization)
5 initialization.c:5:10: Variable g declared but not used
6 initialization.c:5:14: Possible out-of-bounds read: e[22]
7     Unable to resolve constraint:
8     requires maxRead(d @ initialization.c:3:14) >= 22
9      needed to satisfy precondition:
10     requires maxRead(e @ initialization.c:5:14) >= 22
11 initialization.c:8:3: Possible out-of-bounds store: f[2]
12     Unable to resolve constraint:
13     requires maxSet(d @ initialization.c:3:14) >= 2
14      needed to satisfy precondition:
15     requires maxSet(f @ initialization.c:8:3) >= 2
16 simplifyTest.c: (in function fooSub)
17 simplifyTest.c:3:3: Possible out-of-bounds store: s[i]
18     Unable to resolve constraint:
19     requires maxSet(s @ simplifyTest.c:3:3) >= i @ simplifyTest.c:3:5
20      needed to satisfy precondition:
21     requires maxSet(s @ simplifyTest.c:3:3) >= i @ simplifyTest.c:3:5
22 simplifyTest.c: (in function fooAdd)
23 simplifyTest.c:10:3: Possible out-of-bounds store: s[i + 2]
24     Unable to resolve constraint:
25     requires maxSet(s @ simplifyTest.c:10:3) >= i @ simplifyTest.c:10:5 + 2
26      needed to satisfy precondition:
27     requires maxSet(s @ simplifyTest.c:10:3) >= i @ simplifyTest.c:10:5 + 2
28 strncatNotReallyGood.c: (in function NotGoodfunc)
29 strncatNotReallyGood.c:4:29: Passed storage buffer not completely defined
30                                 (*buffer is undefined): strncat (buffer, ...)
31 strncatNotReallyGood.c:4:21: Possible out-of-bounds store:
32     strncat(buffer, str, sizeof((buffer)) - 1)
33     Unable to resolve constraint:
34     requires maxRead(buffer @ strncatNotReallyGood.c:4:29) <= 0
35      needed to satisfy precondition:
36     requires maxSet(buffer @ strncatNotReallyGood.c:4:29) >= maxRead(buffer @
37     strncatNotReallyGood.c:4:29) + 255
38      derived from strncat precondition: requires maxSet(<parameter 1>) >=
39     maxRead(<parameter 1>) + <parameter 3>
40
41 Finished checking --- 8 code warnings, as expected
This page took 0.070345 seconds and 5 git commands to generate.