Skip to content

Commit 4e86edf

Browse files
committed
Add test case
1 parent 4d1608a commit 4e86edf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ func testBoundsChecking(input string) {
264264
_ = int16(parsed)
265265
}
266266
}
267+
if parsed <= math.MaxUint32 {
268+
_ = uint32(parsed)
269+
}
267270
}
268271
{
269272
parsed, err := strconv.ParseUint(input, 10, 32)

0 commit comments

Comments
 (0)