diff --git a/ChangeLog b/ChangeLog index 618f5128e..034646623 100644 --- a/ChangeLog +++ b/ChangeLog @@ -94,6 +94,7 @@ release 0.14.7 * announces torrents immediately to the DHT when it's started * fixed bug in add_files that would fail to recurse if the path ended with a / + * fixed bug in error handling when parsing torrent files release 0.14.6 diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 81fdebd7e..74fc337af 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -234,6 +234,7 @@ namespace libtorrent bool extract_single_file(lazy_entry const& dict, file_entry& target , std::string const& root_dir) { + if (dict.type() != lazy_entry::dict_t) return false; lazy_entry const* length = dict.dict_find("length"); if (length == 0 || length->type() != lazy_entry::int_t) return false;