diff --git a/ChangeLog b/ChangeLog index 9880d8709..10c45d744 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/torrent.cpp b/src/torrent.cpp index 05036e08b..63284c058 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -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;