diff options
Diffstat (limited to 'vendor/modernc.org/libc/honnef.co')
-rw-r--r-- | vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go index bca62b15..61f80522 100644 --- a/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go +++ b/vendor/modernc.org/libc/honnef.co/go/netdb/netdb.go @@ -751,7 +751,10 @@ func init() { portproto := strings.SplitN(fields[1], "/", 2) port, err := strconv.ParseInt(portproto[0], 10, 32) if err != nil { - panic(err) + // If we find lines that don't match the expected format we skip over them. + // The expected format is <service-name> <port>/<protocol> [aliases ...] + // As we're using strings.Fields for splitting the line, failures can happen if the service name field contains white spaces. + continue } proto := portproto[1] |