socks5: fix a (non-critical) off-by-one, fix #4998

This commit is contained in:
Maximilian Hils 2021-12-23 13:43:46 +01:00
parent 9b75f52073
commit f68666d227

View File

@ -204,7 +204,7 @@ class Socks5Proxy(DestinationKnown):
def state_connect(self):
# Parse Connect Request
if len(self.buf) < 4:
if len(self.buf) < 5:
return
if self.buf[:3] != b"\x05\x01\x00":