public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.21.0-9: actually fix SIGSEGV of curl -O -J given more than one URL
@ 2026-11-02 14:27 Paul Howarth
  0 siblings, 0 replies; only message in thread
From: Paul Howarth @ 2026-11-02 14:27 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.21.0-9
Commit : 8b6f7828aad772541a837e616a5a103cddac2d92
Author : Paul Howarth <paul@city-fan.org>
Date   : 2011-08-21T13:23:56+01:00
Stats  : +53/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/8b6f7828aad772541a837e616a5a103cddac2d92?branch=curl-v8.21.0-9

Log:
actually fix SIGSEGV of curl -O -J given more than one URL

---
diff --git a/0005-curl-7.21.7-61ae7e9.patch b/0005-curl-7.21.7-61ae7e9.patch
new file mode 100644
index 0000000..87a1365
--- /dev/null
+++ b/0005-curl-7.21.7-61ae7e9.patch
@@ -0,0 +1,46 @@
+From 61ae7e9ce77af86a7290fca8bf73c9798f80845c Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Sun, 21 Aug 2011 12:59:06 +0200
+Subject: [PATCH] main: fix segfault
+
+Follow-up to commit 5eb2396cd as that wasn't complete.
+
+At times HEADERFUNCTION+HEADERDATA was set only to have only HEADERDATA
+set in the subsequent loop which could cause a NULL to get sent as
+userdata to 'header_callback' which wasn't made to handle that.
+
+Now HEADERFUNCTION is explicitly set to NULL if it isn't set to the
+callback.
+---
+ src/main.c |    8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/main.c b/src/main.c
+index 276718b..56cd133 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -5415,8 +5415,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+         my_setopt(curl, CURLOPT_QUOTE, config->quote);
+         my_setopt(curl, CURLOPT_POSTQUOTE, config->postquote);
+         my_setopt(curl, CURLOPT_PREQUOTE, config->prequote);
+-        my_setopt(curl, CURLOPT_HEADERDATA,
+-                  config->headerfile?&heads:NULL);
+         my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
+         /* cookie jar was added in 7.9 */
+         if(config->cookiejar)
+@@ -5621,6 +5619,12 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+           my_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
+           my_setopt(curl, CURLOPT_HEADERDATA, &outs);
+         }
++        else {
++          /* if HEADERFUNCTION was set to something in the previous loop, it
++             is important that we set it (back) to NULL now */
++          my_setopt(curl, CURLOPT_HEADERFUNCTION, NULL);
++          my_setopt(curl, CURLOPT_HEADERDATA, config->headerfile?&heads:NULL);
++        }
+ 
+         if(config->resolve)
+           /* new in 7.21.3 */
+-- 
+1.7.6
+

diff --git a/curl.spec b/curl.spec
index b03c307..0c33adc 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.21.7
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: MIT
 Group: Applications/Internet
 Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
@@ -13,6 +13,7 @@ Patch1: 0001-curl-7.21.7-a7864c4.patch
 
 # fix SIGSEGV of curl -O -J given more than one URLs (#723075)
 Patch2: 0002-curl-7.21.7-5eb2396.patch
+Patch5: 0005-curl-7.21.7-61ae7e9.patch
 
 # introduce the --delegation option of curl (#730444)
 Patch3: 0003-curl-7.21.7-5538904.patch
@@ -123,6 +124,7 @@ done
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -236,8 +238,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/aclocal/libcurl.m4
 
 %changelog
+* Sun Aug 21 2011 Paul Howarth <paul@city-fan.org> 7.21.7-4
+- actually fix SIGSEGV of curl -O -J given more than one URL (#723075)
+
 * Mon Aug 15 2011 Kamil Dudka <kdudka@redhat.com> 7.21.7-3
-- fix SIGSEGV of curl -O -J given more than one URLs (#723075)
+- fix SIGSEGV of curl -O -J given more than one URL (#723075)
 - introduce the --delegation option of curl (#730444)
 - initialize NSS with no database if the selected database is broken (#728562)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-02 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 14:27 [rpms/curl] curl-v8.21.0-9: actually fix SIGSEGV of curl -O -J given more than one URL Paul Howarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox