snyc some patches
This commit is contained in:
parent
67b61def2c
commit
7e6b655dfd
33
backport-fix-a-coredump-in-TorrentTracker-fix-513.patch
Normal file
33
backport-fix-a-coredump-in-TorrentTracker-fix-513.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From d67fc14d085849a6b0418bb3e912fea2e94c18d1 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
|
||||
Date: Sat, 28 Nov 2020 20:09:11 +0300
|
||||
Subject: [PATCH] fix a coredump in TorrentTracker (fix #513)
|
||||
|
||||
Conflict: NA
|
||||
Reference: https://github.com/lavv17/lftp/commit/d67fc14d085849a6b0418bb3e912fea2e94c18d1
|
||||
---
|
||||
src/TorrentTracker.cc | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/TorrentTracker.cc b/src/TorrentTracker.cc
|
||||
index f867c334..30b531ce 100644
|
||||
--- a/src/TorrentTracker.cc
|
||||
+++ b/src/TorrentTracker.cc
|
||||
@@ -121,7 +121,7 @@ bool TorrentTracker::AddPeer(const xstring& addr,int port) const
|
||||
int TorrentTracker::Do()
|
||||
{
|
||||
int m=STALL;
|
||||
- if(Failed())
|
||||
+ if(Failed() || !backend)
|
||||
return m;
|
||||
if(backend && backend->IsActive()) {
|
||||
if(tracker_timeout_timer.Stopped()) {
|
||||
@@ -165,6 +165,8 @@ void TorrentTracker::Start()
|
||||
}
|
||||
void TorrentTracker::SendTrackerRequest(const char *event)
|
||||
{
|
||||
+ if(!backend)
|
||||
+ return;
|
||||
backend->SendTrackerRequest(event);
|
||||
tracker_timeout_timer.Reset();
|
||||
}
|
||||
47
backport-fix-a-null-deref-on-exit.patch
Normal file
47
backport-fix-a-null-deref-on-exit.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From ced8ab2f95695aee05424e9aa206cd59a3f90888 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
|
||||
Date: Mon, 5 Jul 2021 19:59:33 +0300
|
||||
Subject: [PATCH] fix a null deref on exit
|
||||
|
||||
Conflict: NA
|
||||
Reference: https://github.com/lavv17/lftp/commit/ced8ab2f95695aee05424e9aa206cd59a3f90888
|
||||
|
||||
---
|
||||
src/Job.cc | 7 +++++--
|
||||
src/SMTask.cc | 1 +
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Job.cc b/src/Job.cc
|
||||
index 63be3fb5..b783eae4 100644
|
||||
--- a/src/Job.cc
|
||||
+++ b/src/Job.cc
|
||||
@@ -365,12 +365,15 @@ xstring& Job::FormatJobs(xstring& s,int verbose,int indent)
|
||||
|
||||
void Job::BuryDoneJobs()
|
||||
{
|
||||
- xlist_for_each_safe(Job,all_jobs,node,scan,next)
|
||||
+ xarray<Job*> to_bury;
|
||||
+ xlist_for_each(Job,all_jobs,node,scan)
|
||||
{
|
||||
if((scan->parent==this || scan->parent==0) && scan->jobno>=0
|
||||
&& scan->Done())
|
||||
- scan->DeleteLater();
|
||||
+ to_bury.append(scan);
|
||||
}
|
||||
+ for(int i=0; i<to_bury.count(); i++)
|
||||
+ to_bury[i]->DeleteLater();
|
||||
CollectGarbage();
|
||||
}
|
||||
|
||||
diff --git a/src/SMTask.cc b/src/SMTask.cc
|
||||
index b8a84e2f..435ab8c3 100644
|
||||
--- a/src/SMTask.cc
|
||||
+++ b/src/SMTask.cc
|
||||
@@ -129,6 +129,7 @@ void SMTask::DeleteLater()
|
||||
{
|
||||
if(deleting)
|
||||
return;
|
||||
+ DEBUG(("DeleteLater(%p) from %p\n",this,current));
|
||||
deleting=true;
|
||||
deleted_tasks.add_tail(deleted_tasks_node);
|
||||
PrepareToDie();
|
||||
17
lftp.spec
17
lftp.spec
@ -1,7 +1,7 @@
|
||||
Summary: A sophisticated file transfer program
|
||||
Name: lftp
|
||||
Version: 4.9.2
|
||||
Release: 4
|
||||
Release: 5
|
||||
License: GPLv3+
|
||||
URL: http://lftp.yar.ru/
|
||||
Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
|
||||
@ -10,9 +10,12 @@ BuildRequires: gettext readline-devel, zlib-devel, gcc-c++ desktop-file-utils
|
||||
BuildRequires: chrpath
|
||||
|
||||
Patch0: lftp-4.0.9-date_fmt.patch
|
||||
Patch1: Quit-while-source-file-increased.patch
|
||||
Patch6000: backport-Ensure-that-PollVec-enum-matches-poll-values.patch
|
||||
Patch6001: backport-fix-second-find_cmd-Segmentation-fault.patch
|
||||
|
||||
Patch6000: backport-fix-a-coredump-in-TorrentTracker-fix-513.patch
|
||||
Patch6001: backport-fix-a-null-deref-on-exit.patch
|
||||
Patch6002: backport-Quit-while-source-file-increased.patch
|
||||
Patch6003: backport-Ensure-that-PollVec-enum-matches-poll-values.patch
|
||||
Patch6004: backport-fix-second-find_cmd-Segmentation-fault.patch
|
||||
|
||||
%description
|
||||
LFTP is a sophisticated file transfer program supporting a number of
|
||||
@ -86,6 +89,12 @@ echo "%{_libdir}/lftp/%{version}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arc
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 02 2024 chengyechun <chengyechun1@huawei.com> - 4.9.2-5
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:sync some patches and rename a patch
|
||||
|
||||
* Thu Mar 28 2024 chengyechun <chengyechun1@huawei.com> - 4.9.2-4
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user