diff --git a/connmgr/tor.go b/connmgr/tor.go index 84f5f763..2b22ae51 100644 --- a/connmgr/tor.go +++ b/connmgr/tor.go @@ -99,7 +99,7 @@ func TorLookupIP(host, proxy string) ([]net.IP, error) { return nil, ErrTorInvalidProxyResponse } if buf[1] != 0 { - if int(buf[1]) > len(torStatusErrors) { + if int(buf[1]) >= len(torStatusErrors) { return nil, ErrTorInvalidProxyResponse } else if err := torStatusErrors[buf[1]]; err != nil { return nil, err