go-proxyproto
go-proxyproto copied to clipboard
bufio.Reader doesn't stop on buffer over run.
https://github.com/pires/go-proxyproto/blob/eef9d7ef24f63315b173a5438e7b4c7849bc26b0/protocol.go#L158
The intend here is to do one read syscall but also limit the read to bufSize (256 bytes). The problem is that this bufio.Reader will not stop reading 256 bytes sized chunks after the PP header. this definitely needs a io.LimitReader