Skip to content

Commit

Permalink
Merge pull request #17717 from owen-mc/go/update-incorrect-integer-co…
Browse files Browse the repository at this point in the history
…nversion-qhelp

Go: Update `go/incorrect-integer-conversion` qhelp to explain possible source of FPs
  • Loading branch information
owen-mc authored Oct 21, 2024
2 parents 9ef1a9c + 500992c commit 23a1ea7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ the bit size you specified when parsing the number.
If this is not possible, then add upper (and lower) bound checks specific to each type and
bit size (you can find the minimum and maximum value for each type in the <code>math</code> package).
</p>
<p>
Note that CodeQL is only able to identify bounds checks that compare against a constant value. When a variable
is used in the comparison, CodeQL is unable to determine the value of the variable at runtime and will not
recognize the bounds check.
</p>
</recommendation>

<example>
Expand Down

0 comments on commit 23a1ea7

Please sign in to comment.