mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Fix possible crashes in full allocation mode
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.6.3
|
||||
- BUGFIX: Fix possible crashes in full allocation mode
|
||||
|
||||
* Wed Jan 12 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.6.2
|
||||
- BUGFIX: Do not report PeX as being disabled when DHT is
|
||||
- BUGFIX: Fix possible crash on adding magnet links
|
||||
|
||||
@@ -2583,7 +2583,7 @@ void QBtSession::handleIPFilterError()
|
||||
emit ipFilterParsed(true, 0);
|
||||
}
|
||||
|
||||
entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_info> t, const std::vector<int> &fp)
|
||||
entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_info> &t, const std::vector<int> &fp)
|
||||
{
|
||||
entry::dictionary_type rd;
|
||||
rd["file-format"] = "libtorrent resume file";
|
||||
@@ -2601,6 +2601,7 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in
|
||||
rd["file_priority"] = entry(priorities);
|
||||
// files sizes (useless but required)
|
||||
entry::list_type sizes;
|
||||
sizes.resize(t->num_files());
|
||||
for(int i=0; i<t->num_files(); ++i) {
|
||||
entry::list_type p;
|
||||
p.push_back(entry(0));
|
||||
@@ -2617,7 +2618,8 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in
|
||||
rd["slots"] = entry(tslots);
|
||||
|
||||
entry::string_type pieces;
|
||||
std::memset(&pieces[0], 0, t->num_pieces());
|
||||
pieces.resize(t->num_pieces());
|
||||
std::memset(&pieces[0], 0, pieces.size());
|
||||
rd["pieces"] = entry(pieces);
|
||||
|
||||
entry ret(rd);
|
||||
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
void loadTorrentSettings(QTorrentHandle h);
|
||||
void loadTorrentTempData(QTorrentHandle h, QString savePath, bool magnet);
|
||||
libtorrent::add_torrent_params initializeAddTorrentParams(QString hash);
|
||||
libtorrent::entry generateFilePriorityResumeData(boost::intrusive_ptr<libtorrent::torrent_info> t, const std::vector<int> &fp);
|
||||
libtorrent::entry generateFilePriorityResumeData(boost::intrusive_ptr<libtorrent::torrent_info> &t, const std::vector<int> &fp);
|
||||
|
||||
private slots:
|
||||
void addTorrentsFromScanFolder(QStringList&);
|
||||
|
||||
Reference in New Issue
Block a user