repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fill_db_untrusted: follow untrusted data down the call tree
[smatch.git]
/
validation
/
sm_overflow.c
blob
b55d647b80a307d8963531d92806f21bc4e2b815
1
struct
field
{
2
int
b
[
8
];
3
};
4
5
struct
buffer
{
6
struct
field a
;
7
int
x
;
8
};
9
10
int
main
(
int
argc
,
char
*
argv
[])
11
{
12
struct
buffer b1
;
13
int
i
;
14
15
b1
.
a
.
b
[
10
] =
1
;
16
17
return
42
;
18
}
19
20
/*
21
* check-name: Check array overflow
22
* check-command: smatch sm_overflow.c
23
*
24
* check-output-start
25
sm_overflow.c +15 main(5) error: buffer overflow 'b1.a.b' 8 <= 10
26
* check-output-end
27
*/