From 26ec7921c32bbd548c4457a3c0209560ae1a4ce6 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 6 Dec 2019 14:44:26 +0100 Subject: [PATCH] fix bug in protocol encryption/obfuscation --- ChangeLog | 1 + src/pe_crypto.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a5e0b6241..593818605 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * fix bug in protocol encryption/obfuscation * fix buffer overflow in SOCKS5 UDP logic * fix issue of rapid calls to file_priority() clobbering each other * clear tracker errors on success diff --git a/src/pe_crypto.cpp b/src/pe_crypto.cpp index 94261fcca..7cece6e5f 100644 --- a/src/pe_crypto.cpp +++ b/src/pe_crypto.cpp @@ -328,7 +328,7 @@ namespace libtorrent { std::tuple rc4_handler::decrypt(span> bufs) { - if (!m_decrypt) std::make_tuple(0, 0, 0); + if (!m_decrypt) return std::make_tuple(0, 0, 0); int bytes_processed = 0; for (auto& buf : bufs)