arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation

Home Page:http://libtorrent.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too low limit for bdecode_node header size

glassez opened this issue · comments

TORRENT_ASSERT(header_size < 8 || (type == string && header_size < 10));

Current limit for header size of bdecode_node of string type is 10 which seems to be too low (maybe only since the era of BitTorrent v2).
Users began to complain that some previously added torrents could not be resumed when the qBittorrent was restarted. As it turned out, this affects torrents of large sizes (several tens of GB) and, apparently, only torrents of the second version.
Subsequently, I discovered that the stored "fastresume" data is also quite large (several tens or even hundreds of MB). More specifically, they contain a very long string with hashes, so its header may be longer than the above limit.

I will make this a priority to fix. thanks for the report

the string has to be 100 Megabytes or longer for this problem to arise. Is it the merkle tree for a large file that exceeds this?

here's a fix: #6817

the fix has landed