commit 58b875d7e834ead2f9e80ee9bafb1c7d3bef5877
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Nov 29 09:16:20 2019 +0000
Add fix for rfbz#5433
fix-one-past-end-issue.patch | 24 ++++++++++++++++++++++++
vlc-bittorrent.spec | 8 ++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/fix-one-past-end-issue.patch b/fix-one-past-end-issue.patch
new file mode 100644
index 0000000..d11853d
--- /dev/null
+++ b/fix-one-past-end-issue.patch
@@ -0,0 +1,24 @@
+From eed8cef593635bf9232b0fc74d9df260e5ca3e32 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Fri, 29 Nov 2019 09:05:26 +0000
+Subject: [PATCH] fix one-past-end issue
+
+See issue for details.
+https://github.com/arvidn/libtorrent/issues/4126
+---
+ src/download.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/download.cpp b/src/download.cpp
+index 432dcd5..64d2792 100644
+--- a/src/download.cpp
++++ b/src/download.cpp
+@@ -318,7 +318,7 @@ Download::move_window(int piece)
+ return;
+
+ // Move to first unfinished piece
+- for (; m_torrent_handle.have_piece(piece) && piece < np; piece++);
++ for (; piece < np && m_torrent_handle.have_piece(piece) ; piece++);
+
+ m_window_start = piece;
+
diff --git a/vlc-bittorrent.spec b/vlc-bittorrent.spec
index f8e5174..81412ec 100644
--- a/vlc-bittorrent.spec
+++ b/vlc-bittorrent.spec
@@ -1,11 +1,12 @@
Name: vlc-bittorrent
Version: 2.7
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Bittorrent plugin for VLC
License: GPLv3+
URL:
https://github.com/johang/vlc-bittorrent
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+Patch0: %{url}/pull/37.patch#/fix-one-past-end-issue.patch
BuildRequires: gcc-c++
BuildRequires: libtool
@@ -27,7 +28,7 @@ VLC and stream any media that it contains.
%prep
-%autosetup
+%autosetup -p1
autoreconf -vif
%build
@@ -66,6 +67,9 @@ fi || :
%changelog
+* Fri Nov 29 2019 Leigh Scott <leigh123linux(a)gmail.com> - 2.7-3
+- Add fix for rfbz#5433
+
* Mon Oct 28 2019 Leigh Scott <leigh123linux(a)googlemail.com> - 2.7-2
- Rebuild for libtorrent SONAME bump