mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
25 lines
349 B
Go
25 lines
349 B
Go
|
package testutils
|
||
|
|
||
|
import "github.com/securego/gosec/v2"
|
||
|
|
||
|
var (
|
||
|
// SampleCodeG113 - Usage of Rat.SetString in math/big with an overflow
|
||
|
SampleCodeG113 = []CodeSample{
|
||
|
{[]string{`
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"math/big"
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
r := big.Rat{}
|
||
|
r.SetString("13e-9223372036854775808")
|
||
|
|
||
|
fmt.Println(r)
|
||
|
}
|
||
|
`}, 1, gosec.NewConfig()},
|
||
|
}
|
||
|
)
|