1 int a
[] = {1, 2, 3, 4};
7 static int options_write(void)
24 for (i
= 0; i
< 4 && frob(); i
++)
37 * check-name: smatch array check
38 * check-command: smatch --spammy sm_array_overflow.c
41 sm_array_overflow.c:26 options_write() error: buffer overflow 'a' 4 <= 4
42 sm_array_overflow.c:27 options_write() error: buffer overflow 'b' 4 <= 4
43 sm_array_overflow.c:28 options_write() error: buffer overflow 'c' 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
48 sm_array_overflow.c:34 options_write() error: buffer overflow 'd' 4 <= 4