fixed crash when loading malformed resume file

This commit is contained in:
Arvid Norberg 2012-01-27 05:08:06 +00:00
parent f13a91d8a8
commit 7741b732de
2 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,7 @@
0.15.10 release
* fixed crash when loading resume file with more files than the torrent in it
* fix invalid-parameter error on windows when disabling filesystem disk cache
* fix connection queue issue causing shutdown delays
* fixed mingw build

View File

@ -3870,6 +3870,7 @@ namespace libtorrent
for (file_storage::iterator i = m_torrent_file->files().begin()
, end(m_torrent_file->files().end()); i != end; ++i, ++index)
{
if (i >= m_torrent_file->num_files()) break;
size_type start = position;
size_type size = m_torrent_file->files().file_size(*i);
if (size == 0) continue;