summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-07-11 03:11:43 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-07-11 03:24:56 +0200
commitbff063654b29e7bdbee46aed1ad899b60f1ec2e8 (patch)
tree8150bde302b0954a5f021a070365ee600caf9994 /net-libs/libktorrent/files
parentapp-emulation/qemu-riscv64-bin: Version bump (diff)
downloadgentoo-bff063654b29e7bdbee46aed1ad899b60f1ec2e8.tar.gz
gentoo-bff063654b29e7bdbee46aed1ad899b60f1ec2e8.tar.bz2
gentoo-bff063654b29e7bdbee46aed1ad899b60f1ec2e8.zip
net-libs/libktorrent: Fix a bug in MultiFileCache
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'net-libs/libktorrent/files')
-rw-r--r--net-libs/libktorrent/files/libktorrent-2.2.0-fix-MultiFileCache.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/net-libs/libktorrent/files/libktorrent-2.2.0-fix-MultiFileCache.patch b/net-libs/libktorrent/files/libktorrent-2.2.0-fix-MultiFileCache.patch
new file mode 100644
index 000000000000..bafdbaffefa5
--- /dev/null
+++ b/net-libs/libktorrent/files/libktorrent-2.2.0-fix-MultiFileCache.patch
@@ -0,0 +1,26 @@
+From 5b0abf8378d497c5a8881771518df6a02404d031 Mon Sep 17 00:00:00 2001
+From: Alexander Trufanov <trufanovan@gmail.com>
+Date: Tue, 16 Jun 2020 13:47:42 +0300
+Subject: [PATCH] Fix a bug in MultiFileCache
+
+Differential Revision: https://phabricator.kde.org/D29852
+---
+ src/diskio/multifilecache.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/diskio/multifilecache.cpp b/src/diskio/multifilecache.cpp
+index 0a513ad..882630e 100644
+--- a/src/diskio/multifilecache.cpp
++++ b/src/diskio/multifilecache.cpp
+@@ -455,7 +455,7 @@ namespace bt
+ off = file_off + (piece_off - chunk_off);
+ len = piece_len;
+ }
+- else if(piece_off >= chunk_off && piece_len < chunk_off + chunk_len)
++ else if(piece_off >= chunk_off && piece_off < chunk_off + chunk_len)
+ {
+ // The start of the piece lies partially in the current file
+ off = file_off + (piece_off - chunk_off);
+--
+GitLab
+