Skip to content

Commit

Permalink
Add correct boundary to integer parsing (open-telemetry#187)
Browse files Browse the repository at this point in the history
Fixes open-telemetry#178

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Feb 3, 2021
1 parent 6e6d7c1 commit 62ce67b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/collector/parser/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func portName(receiverName string, port int32) string {
func portFromEndpoint(endpoint string) (int32, error) {
i := strings.LastIndex(endpoint, ":") + 1
part := endpoint[i:]
port, err := strconv.ParseInt(part, 10, 0)
port, err := strconv.ParseInt(part, 10, 32)
return int32(port), err
}

Expand Down

0 comments on commit 62ce67b

Please sign in to comment.