From b20b3ad1acea4c63914d207222c6345ee1208f71 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 21 Sep 2016 19:54:42 -0700 Subject: [PATCH] remove file size limit in torrent_info filename constructor (#1126) --- ChangeLog | 1 + src/torrent_info.cpp | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9123c362f..68b68e061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * remove file size limit in torrent_info filename constructor * fix tail-padding for last file in create_torrent * don't send user-agent in metadata http downloads or UPnP requests when in anonymous mode diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 140d7611b..04508c259 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -643,18 +643,13 @@ namespace libtorrent } int load_file(std::string const& filename, std::vector& v - , error_code& ec, int limit = 8000000) + , error_code& ec) { ec.clear(); file f; if (!f.open(filename, file::read_only, ec)) return -1; boost::int64_t s = f.get_size(ec); if (ec) return -1; - if (s > limit) - { - ec = errors::metadata_too_large; - return -2; - } v.resize(std::size_t(s)); if (s == 0) return 0; file::iovec_t b = {&v[0], size_t(s) };