tree wide: don't print offset into function
[smatch.git] / validation / sm_overflow4.c
blob2d8c9e58e516975e686b32e0021f45cbdf4416b9
1 #include "check_debug.h"
3 void strndup(char *to, int size);
4 void strcpy(char *dest, char *src);
6 void func (char *a, char *b)
8 char c[5];
10 a = strndup(b, 5);
11 strcpy(c, a);
14 * check-name: smatch strndup overflow
15 * check-command: smatch -I.. sm_overflow4.c
17 * check-output-start
18 sm_overflow4.c:11 func() error: strcpy() 'a' too large for 'c' (6 vs 5)
19 * check-output-end