Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conn: ensure control message size is respected in StdNetBind
This commit re-slices received control messages in StdNetBind to the value the OS reports on a successful read. Previously, the len of this slice would always be srcControlSize, which could result in control message values leaking through a sync.Pool round trip. This is unlikely with the IP_PKTINFO socket option set successfully, but should be guarded against. Signed-off-by: James Tucker <[email protected]> Signed-off-by: Jordan Whited <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
- Loading branch information