1 int a
[] = {1, 2, 3, 4};
7 static int options_write(void)
23 for (i
= 0; i
< 4 && frob(); i
++)
36 * check-name: smatch array check
37 * check-command: smatch sm_array_overflow.c
40 sm_array_overflow.c:25 options_write() error: buffer overflow 'a' 4 <= 4
41 sm_array_overflow.c:26 options_write() error: buffer overflow 'b' 4 <= 4
42 sm_array_overflow.c:27 options_write() error: buffer overflow 'c' 4 <= 4
43 sm_array_overflow.c:28 options_write() error: buffer overflow 'd' 4 <= 4
44 sm_array_overflow.c:29 options_write() error: buffer overflow 'str' 4 <= 4
45 sm_array_overflow.c:30 options_write() error: buffer overflow 'str2' 4 <= 4
46 sm_array_overflow.c:31 options_write() error: buffer overflow 'str3' 4 <= 4
47 sm_array_overflow.c:32 options_write() error: buffer overflow 'str4' 4 <= 4