fix to handle 0-size piece response without asserting
This commit is contained in:
parent
ccd75006d4
commit
d06fea3d6c
|
@ -2691,6 +2691,8 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(!m_disk_recv_buffer);
|
||||
TORRENT_ASSERT(disk_buffer_size <= 16 * 1024);
|
||||
|
||||
if (disk_buffer_size == 0) return true;
|
||||
|
||||
if (disk_buffer_size > 16 * 1024)
|
||||
{
|
||||
disconnect("invalid piece size", 2);
|
||||
|
|
Loading…
Reference in New Issue