go-proxyproto icon indicating copy to clipboard operation
go-proxyproto copied to clipboard

bufio.Reader doesn't stop on buffer over run.

Open fd opened this issue 7 months ago • 0 comments

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

fd avatar Jul 01 '25 18:07 fd