user_data2: improve handling when we return user data ranges
commit59ad5f85f291bcfd5f34eaffe0bef9e4de28b36e
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 18 Jan 2017 13:27:07 +0000 (18 16:27 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 18 Jan 2017 13:27:07 +0000 (18 16:27 +0300)
treef33f6a9194e5c2efcc4eacf86db65a5adf54cb7c
parente76c0584cf28027ffe5144b4b438e0c61efef1c0
user_data2: improve handling when we return user data ranges

Imagine you have a statement that does:

return val;

Imagine that val is a parameter and it can be user supplied data but it's
not always.  So either we mark it as user data and we end up with false
positives when it's not or we ignore it and we miss real bugs.

What I've decided to do (this isn't a complete solution) is if we know it's
a parameter because the return states are "s32min-s32max[==$1]" then we can
handle that particular case.

We'll see how well this works out in real life.  It obviously fixes the one
particular bug I was looking at.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_user_data2.c