mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
The `loopVariant` predicate in `ComparisonWithWiderType.ql` is intended to identify loop counters, but it was too much of a stretch to apply it to any subexpression of the small side of the comparison. This change fixes two false positives on arvidn/libtorrent and many others seen in the wild (on Linux, CoreCLR, ffmpeg, ...).