fill_db_untrusted: follow untrusted data down the call tree
[smatch.git] / validation / sm_overflow.c
blobb55d647b80a307d8963531d92806f21bc4e2b815
1 struct field {
2 int b[8];
3 };
5 struct buffer {
6 struct field a;
7 int x;
8 };
10 int main(int argc, char* argv[])
12 struct buffer b1;
13 int i;
15 b1.a.b[10] = 1;
17 return 42;
21 * check-name: Check array overflow
22 * check-command: smatch sm_overflow.c
24 * check-output-start
25 sm_overflow.c +15 main(5) error: buffer overflow 'b1.a.b' 8 <= 10
26 * check-output-end