From: Dan Carpenter Date: Mon, 15 Jul 2013 06:24:45 +0000 (+0300) Subject: db: declare strnlen() as returning "0-s32max[<=p1]" X-Git-Tag: 1.59~3 X-Git-Url: https://repo.or.cz/w/smatch.git/commitdiff_plain/01032e4f7fdcd232b0d2135c4ec2cffe7bd46191 db: declare strnlen() as returning "0-s32max[<=p1]" It used to annotated as returning up to u32max but if you saved the return value in a signed int then the u32max wrapped to negative. It caused false positives. Signed-off-by: Dan Carpenter --- diff --git a/smatch_data/db/fixup_all.sh b/smatch_data/db/fixup_all.sh index aeaa2a8c..6df89ad7 100755 --- a/smatch_data/db/fixup_all.sh +++ b/smatch_data/db/fixup_all.sh @@ -3,7 +3,7 @@ # mark some paramaters as coming from user space cat << EOF | sqlite3 smatch_db.sqlite -update return_states set return = '0-u32max[<=p1]' where function = 'strnlen'; +update return_states set return = '0-s32max[<=p1]' where function = 'strnlen'; EOF