diff --git a/0017-curl-7.21.0-61ae7e9.patch b/0017-curl-7.21.0-61ae7e9.patch new file mode 100644 index 0000000..763818d --- /dev/null +++ b/0017-curl-7.21.0-61ae7e9.patch @@ -0,0 +1,46 @@ +From 61ae7e9ce77af86a7290fca8bf73c9798f80845c Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +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 +@@ -5165,8 +5165,6 @@ + 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) +@@ -5368,6 +5366,12 @@ + 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); ++ } + + /* new in 7.22.0 */ + if(config->gssapi_delegation) +-- +1.7.6 + diff --git a/curl.spec b/curl.spec index 3175036..367356c 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.0 -Release: 9%{?dist} +Release: 10%{?dist} License: MIT Group: Applications/Internet Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma @@ -53,6 +53,7 @@ Patch14: 0014-curl-7.21.0-a7864c4.patch # fix SIGSEGV of curl -O -J given more than one URLs (#723075) Patch15: 0015-curl-7.21.0-5eb2396.patch +Patch17: 0017-curl-7.21.0-61ae7e9.patch # introduce the --delegation option of curl (#730444) Patch16: 0016-curl-7.21.0-5538904.patch @@ -165,6 +166,7 @@ done %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 # Fedora patches %patch101 -p1 @@ -280,9 +282,12 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/libcurl.m4 %changelog +* Sun Aug 21 2011 Paul Howarth 7.21.0-10 +- actually fix SIGSEGV of curl -O -J given more than one URL (#723075) + * Tue Aug 16 2011 Kamil Dudka 7.21.0-9 - add a new option CURLOPT_GSSAPI_DELEGATION (#719939) -- 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) * Thu Jun 23 2011 Kamil Dudka 7.21.0-8