Accepting request 859844 from home:Vogtinator:branches:KDE:Applications
- Add patches to fix issues reported by valgrind (boo#1180352): * 0001-Initialize-Transfer-m_runningSeconds.patch * 0002-Don-t-create-dangling-iterators-in-TransferMultiSegK.patch- OBS-URL: https://build.opensuse.org/request/show/859844 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kget?expand=0&rev=135
This commit is contained in:
parent
10d0aa3eb2
commit
d0ccbac6c0
23
0001-Initialize-Transfer-m_runningSeconds.patch
Normal file
23
0001-Initialize-Transfer-m_runningSeconds.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 21fe11c2d0be6d135d3ffe87e925ae7eeea7f653 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Wed, 30 Dec 2020 17:16:49 +0100
|
||||
Subject: [PATCH 1/2] Initialize Transfer::m_runningSeconds
|
||||
|
||||
Valgrind complained about that.
|
||||
---
|
||||
core/transfer.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: kget-20.12.0/core/transfer.cpp
|
||||
===================================================================
|
||||
--- kget-20.12.0.orig/core/transfer.cpp
|
||||
+++ kget-20.12.0/core/transfer.cpp
|
||||
@@ -49,7 +49,7 @@ Transfer::Transfer(TransferGroup * paren
|
||||
m_percent(0), m_downloadSpeed(0), m_uploadSpeed(0),
|
||||
m_uploadLimit(0), m_downloadLimit(0), m_isSelected(false),
|
||||
m_capabilities(0), m_visibleUploadLimit(0), m_visibleDownloadLimit(0),
|
||||
- m_ratio(0), m_handler(nullptr), m_factory(factory)
|
||||
+ m_runningSeconds(0), m_ratio(0), m_handler(nullptr), m_factory(factory)
|
||||
{
|
||||
Q_UNUSED(e)
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
From 7cb5edab11bcf99788451b00994854d175386781 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Wed, 30 Dec 2020 17:17:25 +0100
|
||||
Subject: [PATCH 2/2] Don't create dangling iterators in TransferMultiSegKio
|
||||
|
||||
m_dataSourceFactory->mirrors() returns a value, which is destroyed after the
|
||||
assignment, but the iterators still point to it.
|
||||
---
|
||||
transfer-plugins/multisegmentkio/transfermultisegkio.cpp | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/transfer-plugins/multisegmentkio/transfermultisegkio.cpp b/transfer-plugins/multisegmentkio/transfermultisegkio.cpp
|
||||
index 5b5d898b..87b74148 100644
|
||||
--- a/transfer-plugins/multisegmentkio/transfermultisegkio.cpp
|
||||
+++ b/transfer-plugins/multisegmentkio/transfermultisegkio.cpp
|
||||
@@ -182,8 +182,9 @@ void TransferMultiSegKio::slotDataSourceFactoryChange(Transfer::ChangesFlags cha
|
||||
}
|
||||
if (change & Tc_Source) {
|
||||
m_source = QUrl();
|
||||
- QHash< QUrl, QPair<bool, int> >::const_iterator it = m_dataSourceFactory->mirrors().constBegin();
|
||||
- QHash< QUrl, QPair<bool, int> >::const_iterator end = m_dataSourceFactory->mirrors().constEnd();
|
||||
+ QHash< QUrl, QPair<bool, int> > mirrors = m_dataSourceFactory->mirrors();
|
||||
+ QHash< QUrl, QPair<bool, int> >::const_iterator it = mirrors.constBegin();
|
||||
+ QHash< QUrl, QPair<bool, int> >::const_iterator end = mirrors.constEnd();
|
||||
for (; it != end; it++) {
|
||||
if (it.value().first) {
|
||||
m_source = it.key();
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 2 14:52:43 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Add patches to fix issues reported by valgrind (boo#1180352):
|
||||
* 0001-Initialize-Transfer-m_runningSeconds.patch
|
||||
* 0002-Don-t-create-dangling-iterators-in-TransferMultiSegK.patch-
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 5 23:16:16 UTC 2020 - Luca Beltrame <lbeltrame@kde.org>
|
||||
|
||||
|
@ -27,6 +27,9 @@ Summary: Download Manager
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Networking/Other
|
||||
Source: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Initialize-Transfer-m_runningSeconds.patch
|
||||
Patch2: 0002-Don-t-create-dangling-iterators-in-TransferMultiSegK.patch
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: gpgme-devel
|
||||
BuildRequires: libboost_headers-devel
|
||||
@ -72,7 +75,7 @@ An advanced download manager by KDE
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%cmake_kf5 -d build
|
||||
|
Loading…
Reference in New Issue
Block a user