Bug 392202

Summary: 4MB metadata limit is too small
Product: [Applications] ktorrent Reporter: FeepingCreature <default_357-line>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: normal CC: andrius, mail
Priority: NOR    
Version: 5.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 21.04.0

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.