There is no memory corruption when array is casted to struct (if array is large enough):
int Buf[100]; struct S * P = (struct S *)Buf;
This patch will fix false positives for that. However it does not check if the buffer is large enough. So this patch could cause false negatives.