update curl to 7.71.1

This commit is contained in:
compile_success 2020-07-24 17:25:53 +08:00
parent 7f998a0f9e
commit ca7adb079c
7 changed files with 8 additions and 135 deletions

View File

@ -1,71 +0,0 @@
From 855ebacdffbc421b121563ae1ecd9fde736bfaf2 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 11 Sep 2019 16:32:11 +0200
Subject: [PATCH] curl: fix memory leaked by parse_metalink()
This commit fixes a regression introduced by curl-7_65_3-5-gb88940850.
Detected by tests 2005, 2008, 2009, 2010, 2011, and 2012 with valgrind
and libmetalink enabled.
Closes #4326
Upstream-commit: 1ca91bcdb588dc6c25d345f2411fdba314433732
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/tool_metalink.c | 2 +-
src/tool_metalink.h | 3 +++
src/tool_operate.c | 4 ++++
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 0740407f9..cd5a7d650 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -965,7 +965,7 @@ static void delete_metalink_resource(metalink_resource *res)
Curl_safefree(res);
}
-static void delete_metalinkfile(metalinkfile *mlfile)
+void delete_metalinkfile(metalinkfile *mlfile)
{
metalink_resource *res;
if(mlfile == NULL) {
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
index 1e367033c..f5ec306f7 100644
--- a/src/tool_metalink.h
+++ b/src/tool_metalink.h
@@ -105,6 +105,8 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
* Counts the resource in the metalinkfile.
*/
int count_next_metalink_resource(metalinkfile *mlfile);
+
+void delete_metalinkfile(metalinkfile *mlfile);
void clean_metalink(struct OperationConfig *config);
/*
@@ -158,6 +160,7 @@ void metalink_cleanup(void);
#else /* USE_METALINK */
#define count_next_metalink_resource(x) 0
+#define delete_metalinkfile(x) (void)x
#define clean_metalink(x) (void)x
/* metalink_cleanup() takes no arguments */
diff --git a/src/tool_operate.c b/src/tool_operate.c
index d2ad9642d..09dfc0c84 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -2073,6 +2073,10 @@ static CURLcode serial_transfers(struct GlobalConfig *global,
result = post_transfer(global, share, per, result, &retry);
if(retry)
continue;
+
+ /* Release metalink related resources here */
+ delete_metalinkfile(per->mlfile);
+
per = del_transfer(per);
/* Bail out upon critical errors or --fail-early */
--
2.20.1

View File

@ -31,7 +31,7 @@ index 150004d..95d0759 100644
- else - else
- CURLLIBDIR="" - CURLLIBDIR=""
- fi - fi
- if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then - if test "X@ENABLE_SHARED@" = "Xno" -o "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
- echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@ - echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
- else - else
- echo ${CURLLIBDIR}-lcurl - echo ${CURLLIBDIR}-lcurl

View File

@ -1,57 +0,0 @@
From 3c4c7340e455b7256c0786759422f34ec3e2d440 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 15 Mar 2018 14:49:56 +0100
Subject: [PATCH] tests/{negtelnet,smb}server.py: migrate to Python 3
Unfortunately, smbserver.py does not work with Python 3 because
there is no 'impacket' module available for Python 3:
https://github.com/CoreSecurity/impacket/issues/61
---
tests/negtelnetserver.py | 4 ++--
tests/smbserver.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
index 8cfd409..72ee771 100755
--- a/tests/negtelnetserver.py
+++ b/tests/negtelnetserver.py
@@ -73,11 +73,11 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
response_data = response.encode('ascii')
else:
log.debug("Received normal request - echoing back")
- response_data = data.strip()
+ response_data = data.decode('utf8').strip()
if response_data:
log.debug("Sending %r", response_data)
- self.request.sendall(response_data)
+ self.request.sendall(response_data.encode('utf8'))
except IOError:
log.exception("IOError hit during request")
diff --git a/tests/smbserver.py b/tests/smbserver.py
index 195ae39..b09cd44 100755
--- a/tests/smbserver.py
+++ b/tests/smbserver.py
@@ -24,7 +24,7 @@
from __future__ import (absolute_import, division, print_function)
# unicode_literals)
import argparse
-import ConfigParser
+import configparser
import os
import sys
import logging
@@ -58,7 +58,7 @@ def smbserver(options):
f.write("{0}".format(pid))
# Here we write a mini config for the server
- smb_config = ConfigParser.ConfigParser()
+ smb_config = configparser.ConfigParser()
smb_config.add_section("global")
smb_config.set("global", "server_name", "SERVICE")
smb_config.set("global", "server_os", "UNIX")
--
2.14.3

View File

@ -33,7 +33,7 @@ index 080421b..ea3b806 100644
+lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp +lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp
lib1560_LDADD = $(TESTUTIL_LIBS) lib1560_LDADD = $(TESTUTIL_LIBS)
lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib1564_SOURCES = lib1564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
-- --
2.17.2 2.17.2

Binary file not shown.

BIN
curl-7.71.1.tar.xz Normal file

Binary file not shown.

View File

@ -5,17 +5,15 @@
%global _configure ../configure %global _configure ../configure
Name: curl Name: curl
Version: 7.66.0 Version: 7.71.1
Release: 3 Release: 1
Summary: Curl is used in command lines or scripts to transfer data Summary: Curl is used in command lines or scripts to transfer data
License: MIT License: MIT
URL: https://curl.haxx.se/ URL: https://curl.haxx.se/
Source: https://curl.haxx.se/download/curl-%{version}.tar.xz Source: https://curl.haxx.se/download/curl-%{version}.tar.xz
Patch1: 0001-curl-7.66.0-metalink-memleak.patch
Patch101: 0101-curl-7.32.0-multilib.patch Patch101: 0101-curl-7.32.0-multilib.patch
Patch102: 0102-curl-7.36.0-debug.patch Patch102: 0102-curl-7.36.0-debug.patch
Patch103: 0103-curl-7.59.0-python3.patch
Patch104: 0104-curl-7.19.7-localhost6.patch Patch104: 0104-curl-7.19.7-localhost6.patch
Patch105: 0105-curl-7.63.0-lib1560-valgrind.patch Patch105: 0105-curl-7.63.0-lib1560-valgrind.patch
Patch106: 0106-curl-fix-CVE-2019-15601.patch Patch106: 0106-curl-fix-CVE-2019-15601.patch
@ -142,7 +140,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%files -n libcurl-devel %files -n libcurl-devel
%defattr(-,root,root) %defattr(-,root,root)
%doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS.md %doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS.md
%doc docs/CONTRIBUTE.md docs/libcurl/ABI %doc docs/CONTRIBUTE.md docs/libcurl/ABI.md
%{_bindir}/curl-config* %{_bindir}/curl-config*
%{_includedir}/curl %{_includedir}/curl
%{_libdir}/*.so %{_libdir}/*.so
@ -159,6 +157,9 @@ rm -rf ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_mandir}/man3/* %{_mandir}/man3/*
%changelog %changelog
* Fri Jul 24 2020 zhujunhao <zhujunhao8@huawei.com> - 7.71.1-1
- Update to 7.71.1
* Thu Apr 9 2020 songnannan <songnannan2@huawei.com> - 7.66.0-3 * Thu Apr 9 2020 songnannan <songnannan2@huawei.com> - 7.66.0-3
- split out the libcurl and libcurl-devel package - split out the libcurl and libcurl-devel package