diff --git a/internal/container/container.go b/internal/container/container.go index e3a4375..8c80b30 100644 --- a/internal/container/container.go +++ b/internal/container/container.go @@ -56,6 +56,11 @@ func (c Container) Services() map[string]uint16 { continue } + if portNumber > 65535 { + log.Logf(log.PriErr, "Port number %d is too large", portNumber) + continue + } + service := netdb.GetServByPort(int(portNumber), proto) if service == nil || proto == nil {