Skip to content

Commit

Permalink
correcting imports of style
Browse files Browse the repository at this point in the history
  • Loading branch information
augustync committed Oct 21, 2024
1 parent fdee8ba commit d86ccd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func GetChildNumsFromHex(hexHash string) ([]uint32, error) {
if err != nil {
return nil, spverrors.Wrapf(err, "cannot parse child number from hex string")
}

if num > MaxInt32 {
num = num - MaxInt32
}
childNums = append(childNums, uint32(num)) //nolint:gosec // todo: re-work to remove casting (possible cutoff)

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type uint32 without an upper bound check.
}

Expand Down

0 comments on commit d86ccd8

Please sign in to comment.