Commit Graph

7 Commits

Author SHA1 Message Date
Matt Joiner abb5cbc96e
Check for chunks overflowing piece bounds on request read
Test for integer overflow in when checking read requests are within the bounds of the associated piece. Another fix is required to limit the amount of memory that can be allocated for such requests.
2023-02-13 23:27:15 +11:00
Matt Joiner c18e0abe52 Fix incomplete Integer.Read
Possibly on read buffer boundaries, this would have caused errant io.ErrUnexpectedEOF.

(cherry picked from commit 22569449dad48e1c5cdeac171625585f8ca976c9)
2021-10-19 14:07:23 +11:00
Matt Joiner 73696fd215 peer_protocol: Use faster form for Integer.{UnmarshalBinary,Read} 2021-09-30 10:24:03 +10:00
Matt Joiner 60a622ff4b Remove an allocation reading message length 2021-09-30 09:59:18 +10:00
Matt Joiner 1b66994c0a Add some fuzzing in peer_protocol 2021-09-30 09:01:10 +10:00
Matt Joiner ee985e51cb Add peer_protocol.Integer.Uint32 2018-07-12 09:16:40 +10:00
Matt Joiner b610107d8d Break up peer_protocol into several files 2018-02-02 21:29:57 +11:00