Closed uberswe closed 3 years ago
Found via CodeQL
Converting the result of strconv.Atoi, strconv.ParseInt, and strconv.ParseUint to integer types of smaller bit size can produce unexpected values.
strconv.Atoi
strconv.ParseInt
strconv.ParseUint
Incorrect conversion of a 64-bit integer from strconv.ParseInt to a lower bit size type int without an upper bound check.
https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L159-L159 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L101-L101 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L93-L93 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L39-L39
Found via CodeQL
Converting the result of
strconv.Atoi
,strconv.ParseInt
, andstrconv.ParseUint
to integer types of smaller bit size can produce unexpected values.Incorrect conversion of a 64-bit integer from strconv.ParseInt to a lower bit size type int without an upper bound check.
https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L159-L159 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L101-L101 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L93-L93 https://github.com/uberswe/beubo/blob/7870404f704a1b89d69f68485a2e695589d637eb/pkg/routes/page.go#L39-L39