Bug 392202 - 4MB metadata limit is too small
Summary: 4MB metadata limit is too small
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 5.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-22 22:26 UTC by FeepingCreature
Modified: 2020-12-04 19:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FeepingCreature 2018-03-22 22:26:37 UTC
When opening a torrent file that is larger than 4MB, KTorrent accepts it; however, it rejects every peer that attempts to connect due to "wrong metadata size" - a message that is highly misleading, since the displayed size also does not match the torrent file; however, it's due to exceeding MAX_METADATA_SIZE in libktorrent/src/peer/peer.cpp.

At least one torrent file with a 9MB torrent (the Touhou Lossless Music Collection) exists in the wild. When patched, peers connect without issue.
Comment 1 Melvin Vermeeren 2020-12-04 19:04:34 UTC
Hit the same issue recently and today I decided to dig into things, found the root cause and also the bug report here. MR submitted to fix it, see https://invent.kde.org/network/libktorrent/-/merge_requests/26.