Skip to content

Commit

Permalink
replace Atoi with ParseUint
Browse files Browse the repository at this point in the history
Incorrect conversion between integer types, discovered by CodeQL
  • Loading branch information
jfcg authored Sep 22, 2021
1 parent ab5157e commit be73400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type Store interface {
// where X is 'i' or 'o'
func mIDFromKey(key string) uint16 {
s := key[2:]
i, err := strconv.Atoi(s)
i, err := strconv.ParseUint(s, 10, 16)
chkerr(err)
return uint16(i)
}
Expand Down

0 comments on commit be73400

Please sign in to comment.