gobwas / ws

Tiny WebSocket library for Go.
MIT License
6.1k stars 373 forks source link

Handshake.Extentions pointing to a buffer already returned to pbufio.ReaderPool #157

Closed magicxyyz closed 1 year ago

magicxyyz commented 1 year ago

Extensions in Handshake returned from (Dialer) Upgrade contain slices pointing to memory in buffer already returned to pbufio.ReaderPool.

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L293-L307

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L355

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L365

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L415-L419

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L494-L508

https://github.com/gobwas/ws/blob/26e4a4444d77ecdf8a75215099f27cf941ce2db9/dialer.go#L475-L492