buffer_too_small_for_struct: a variable size buffer is smaller a struct
It's common to get some data from the user and put it in a struct, but
what about if the struct is too small? This check prints a warning.
There are some false positives:
1) Sometimes you only care about the first members of the struct.
2) Lustre is confusing.
3) You're allocating an array and only loop through the elements when the
number is non-zero.
4) One driver passes the size of the buffer as a parameter but sometimes
overloads the size to mean something else instead of the size.
5) Smatch couldn't figure out the size. Sometimes this is because it came
from the hardware.
But mostly it's good stuff and these sometimes bad bugs so I'm going to
release this check to the public.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>