!16 fix wget killed by SIGSEGV
From: @eaglegai Reviewed-by: @seuzw Signed-off-by: @seuzw
This commit is contained in:
commit
f82071d2fd
39
backport-wget-1.21-segfault.patch
Normal file
39
backport-wget-1.21-segfault.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From aecf5fbf1bf05e91c4900a814a12dc91a50dc788 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Darshit Shah <darnir@gnu.org>
|
||||||
|
Date: Fri, 8 Oct 2021 20:34:46 +0200
|
||||||
|
Subject: [PATCH] * ftp.c (ftp_loop_internal): Fix computation of
|
||||||
|
total_downloaded_bytes
|
||||||
|
|
||||||
|
When continuing a FTP download, or not starting one because the file is
|
||||||
|
already fully retrieved, don't include the size of the file in the
|
||||||
|
total_downloaded_bytes. Only the actual amount of data retrieved over
|
||||||
|
the network should be considered there.
|
||||||
|
|
||||||
|
Fixes: #61277
|
||||||
|
Reported-By: Michal Ruprich <formaiko>
|
||||||
|
---
|
||||||
|
src/ftp.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/ftp.c b/src/ftp.c
|
||||||
|
index a1fcaa50..e821b0f3 100644
|
||||||
|
--- a/src/ftp.c
|
||||||
|
+++ b/src/ftp.c
|
||||||
|
@@ -2083,7 +2083,7 @@ ftp_loop_internal (struct url *u, struct url *original_url, struct fileinfo *f,
|
||||||
|
/* --dont-remove-listing was specified, so do count this towards the
|
||||||
|
number of bytes and files downloaded. */
|
||||||
|
{
|
||||||
|
- total_downloaded_bytes += qtyread;
|
||||||
|
+ total_downloaded_bytes += (qtyread - restval);
|
||||||
|
numurls++;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2098,7 +2098,7 @@ ftp_loop_internal (struct url *u, struct url *original_url, struct fileinfo *f,
|
||||||
|
downloaded if they're going to be deleted. People seeding proxies,
|
||||||
|
for instance, may want to know how many bytes and files they've
|
||||||
|
downloaded through it. */
|
||||||
|
- total_downloaded_bytes += qtyread;
|
||||||
|
+ total_downloaded_bytes += (qtyread - restval);
|
||||||
|
numurls++;
|
||||||
|
|
||||||
|
if (opt.delete_after && !input_file_url (opt.input_filename))
|
||||||
11
wget.spec
11
wget.spec
@ -1,12 +1,13 @@
|
|||||||
Name: wget
|
Name: wget
|
||||||
Version: 1.21.2
|
Version: 1.21.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A package for retrieving files using HTTP, HTTPS, FTP and FTPS the most widely-used Internet protocols.
|
Summary: A package for retrieving files using HTTP, HTTPS, FTP and FTPS the most widely-used Internet protocols.
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Url: http://www.gnu.org/software/wget/
|
Url: http://www.gnu.org/software/wget/
|
||||||
Source: https://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz
|
Source: https://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz
|
||||||
|
|
||||||
Patch6000: backport-wget-1.21-ssl-init-output.patch
|
Patch0: backport-wget-1.21-ssl-init-output.patch
|
||||||
|
Patch1: backport-wget-1.21-segfault.patch
|
||||||
|
|
||||||
Provides: webclient bundled(gnulib)
|
Provides: webclient bundled(gnulib)
|
||||||
BuildRequires: perl-HTTP-Daemon python3 libuuid-devel perl-podlators libpsl-devel libmetalink-devel
|
BuildRequires: perl-HTTP-Daemon python3 libuuid-devel perl-podlators libpsl-devel libmetalink-devel
|
||||||
@ -54,6 +55,12 @@ make check
|
|||||||
%{_infodir}/*
|
%{_infodir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Oct 22 2022 gaihuiying <eaglegai@163.com> - 1.21.2-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix find_cell(): wget killed by SIGSEGV
|
||||||
|
|
||||||
* Tue Mar 22 2022 xihaochen <xihaochen@huawei.com> - 1.21.2-1
|
* Tue Mar 22 2022 xihaochen <xihaochen@huawei.com> - 1.21.2-1
|
||||||
- Type:requirements
|
- Type:requirements
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user