Unverified Commit 175ad663 authored by NagyDonat's avatar NagyDonat Committed by GitHub
Browse files

[analyzer] Mention possibility of underflow in array overflow errors (#84201)



The checker alpha.security.ArrayBoundV2 performs bounds checking in two
steps: first it checks for underflow, and if it isn't guaranteed then it
assumes that there is no underflow. After this, it checks for overflow,
and if that's guaranteed or the index is tainted then it reports it.

This meant that in situations where overflow and underflow are both
possible (but the index is either tainted or guaranteed to be invalid),
the checker was reporting just an overflow error.

This commit modifies the messages printed in these cases to mention the
possibility of an underflow.

---------

Co-authored-by: default avatarBalazs Benics <benicsbalazs@gmail.com>
parent 335f3659
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment