Bug 222036 - Data corruption when downloading additional files
Summary: Data corruption when downloading additional files
Status: VERIFIED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 11:50 UTC by Peter Klotz
Modified: 2010-07-23 21:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Klotz 2010-01-10 11:50:00 UTC
Version:           3.2.4 (using KDE 4.3.2)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Ubuntu Packages

This bug can be reproduced very easily, at least in KTorrent 3.2.4 amd64.

Use this torrent containing two files for example:

http://torrent.fedoraproject.org/torrents/Fedora-12-x86_64-Live.torrent

Add the torrent but select no files to download. After adding, navigate to the "Files" section and add the file "Fedora-12-x86_64-CHECKSUM" manually for download.

KTorrent starts downloading the corresponding 256kB chunk and finishes. However "Fedora-12-x86_64-CHECKSUM" ends up having 262144 Bytes (the whole chunk) instead of only 1525 Bytes. It seems that the checksum file is padded with a part of the ISO image that is also contained in the torrent.

The "Check Data" option does not find any errors.

I tried compiling KTorrent 3.3.2 but was unable to manually add files there. Maybe someone can check if this problem still persists.
Comment 1 Joris Guisson 2010-01-11 18:35:05 UTC
SVN commit 1073135 by guisson:

Fix bug causing files to be created which are to big in some rare circumstances

BUG: 222036

 M  +1 -0      ChangeLog  
 M  +6 -2      libbtcore/diskio/multifilecache.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1073135
Comment 2 Peter Klotz 2010-07-23 21:26:43 UTC
I can confirm that the bug is fixed in KTorrent 3.3.4 (Ubuntu 10.04 amd64).