crytic / amarna

Amarna is a static-analyzer and linter for the Cairo programming language.
https://blog.trailofbits.com/2022/04/20/amarna-static-analysis-for-cairo-programs/
GNU Affero General Public License v3.0
149 stars 7 forks source link

Don't warn about overflows on const values #53

Closed milancermak closed 1 year ago

milancermak commented 1 year ago

If possible, it would be great to avoid false positives when detecting potential overflows like this one on the screenshot

Screenshot 2022-07-25 at 17 13 54

It's clear that 8000 * 5 is a constant value that fits inside a felt, there's no overflow hazard.

Here's a gif of a dachshund kissing a lion for no particular reason

fcasal commented 1 year ago

As always, thanks for the rule improvement suggestions!