mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
27 lines
411 B
Go
27 lines
411 B
Go
// Note that the filename acts as an implicit build constraint
|
|
|
|
package main
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
func testIntSinkAmd64() {
|
|
{
|
|
parsed, err := strconv.ParseInt("3456", 10, 64)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed)
|
|
_ = uint(parsed)
|
|
}
|
|
{
|
|
parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed) // $ Alert
|
|
_ = uint(parsed)
|
|
}
|
|
}
|