Open
Description
I have a tracker server that handles many announces in quick succession.
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at MonoTorrent.TrackerServer.SimpleTorrentManager.GetPeers(BEncodedDictionary response, Int32 count, Boolean compact, AddressFamily addressFamily) in C:\Projects\monotorrent\src\MonoTorrent.Client\MonoTorrent.TrackerServer\SimpleTorrentManager.cs:line 179
at MonoTorrent.TrackerServer.TrackerServer.ListenerReceivedAnnounce(Object sender, AnnounceRequest e) in C:\Projects\monotorrent\src\MonoTorrent.Client\MonoTorrent.TrackerServer\TrackerServer.cs:line 268
at MonoTorrent.Connections.TrackerServer.TrackerListener.Handle(NameValueCollection collection, IPAddress remoteAddress, Boolean isScrape) in C:\Projects\monotorrent\src\MonoTorrent.Trackers\MonoTorrent.Connections.TrackerServer\TrackerListener.cs:line 65
It appears to happen if you announce an ipv6 address then immediately announce the same torrent with an ipv4 address. The PeerList is remains the same length thus is not updated but the address family switches so the ipv6 peerlist will overflow the the buffer which was allocated for ipv4 stride sizes.
Metadata
Metadata
Assignees
Labels
No labels