[package] add missing rtorrent patch from #6111
git-svn-id: svn://svn.openwrt.org/openwrt/packages@18341 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
53bfab1f21
commit
ae29748243
15
net/rtorrent/patches/011-fix-bitfield-crash.patch
Normal file
15
net/rtorrent/patches/011-fix-bitfield-crash.patch
Normal file
@ -0,0 +1,15 @@
|
||||
# Fix crash when trying to call d.get_bitfield on a closed download. Ticket #1825 from libtorrent.rakshasa.no.
|
||||
Index: rtorrent/src/command_download.cc
|
||||
===================================================================
|
||||
--- rtorrent/src/command_download.cc (revision 1093)
|
||||
+++ rtorrent/src/command_download.cc (working copy)
|
||||
@@ -292,6 +292,9 @@
|
||||
|
||||
torrent::Object
|
||||
retrieve_d_bitfield(core::Download* download) {
|
||||
+ if (!download->download()->file_list()->is_open())
|
||||
+ throw torrent::input_error("Cannot retrieve bitfield of closed download.");
|
||||
+
|
||||
const torrent::Bitfield* bitField = download->download()->file_list()->bitfield();
|
||||
|
||||
return torrent::Object(rak::transform_hex(bitField->begin(), bitField->end()));
|
Loading…
x
Reference in New Issue
Block a user