Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/taint-modulus-1.c

raw
1 #define SIZE 16
2 char buf[SIZE];
3
4 __attribute__ ((tainted_args))
5 char test_sanitized_by_modulus (int val)
6 {
7 return buf[val % SIZE]; /* { dg-bogus "use of attacker-controlled value" } */
8 }