3 #include "check_debug.h"
5 void *kmalloc(int size
, int mask
);
16 p
= kmalloc(sizeof(*p
) + 100, 0);
19 __smatch_buf_size(p
->buf
);
26 * check-name: smatch: overflow check #5
27 * check-command: smatch -p=kernel -I.. sm_array_overflow5.c
30 sm_array_overflow5.c:19 main() buf size: 'p->buf' 25 elements, 100 bytes