We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ed0145 commit 773f46dCopy full SHA for 773f46d
go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go
@@ -333,8 +333,11 @@ func testBoundsChecking(input string) {
333
_ = uint16(parsed)
334
_ = int16(parsed) // $ hasValueFlow="type conversion"
335
}
336
- if parsed < 5 {
337
- _ = uint16(parsed)
+ if parsed <= 255 {
+ _ = uint8(parsed)
338
+ }
339
+ if parsed <= 256 {
340
+ _ = uint8(parsed) // $ hasValueFlow="type conversion"
341
342
if err == nil && 1 == 1 && parsed < math.MaxInt8 {
343
_ = int8(parsed)
0 commit comments