[curl/f15] avoid an invalid timeout event on a reused handle (#679709)

Kamil Dudka kdudka at fedoraproject.org
Wed Jun 8 00:02:29 UTC 2011


commit d49e94c0443a884e2f56098213b511627a05e55a
Author: Kamil Dudka <kdudka at redhat.com>
Date:   Wed Jun 8 00:43:11 2011 +0200

    avoid an invalid timeout event on a reused handle (#679709)

 0001-curl-7.21.3-f551aa5.patch |   29 +++++++++++++++++++++++++++++
 curl.spec                      |   13 ++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
---
diff --git a/0001-curl-7.21.3-f551aa5.patch b/0001-curl-7.21.3-f551aa5.patch
new file mode 100644
index 0000000..2207c19
--- /dev/null
+++ b/0001-curl-7.21.3-f551aa5.patch
@@ -0,0 +1,29 @@
+From 52e8b2f05d7a69444280573d5e3427ff49fbb75a Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka at redhat.com>
+Date: Tue, 7 Jun 2011 15:57:13 +0200
+Subject: [PATCH] disconnect: wipe out the keeps_speed time stamp
+
+When closing a connection, the speedchecker's timestamp is now deleted
+so that it cannot accidentally be used by a fresh connection on the same
+handle when examining the transfer speed.
+
+Bug: https://bugzilla.redhat.com/679709
+---
+ lib/url.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index 8511ffe..d6e9d09 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -2681,6 +2681,7 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
+ 
+   conn_free(conn);
+   data->state.current_conn = NULL;
++  Curl_speedinit(data);
+ 
+   return CURLE_OK;
+ }
+-- 
+1.7.4.4
+
diff --git a/curl.spec b/curl.spec
index 48a744e..a1b3d3d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.21.3
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: MIT
 Group: Applications/Internet
 Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
 Source2: curlbuild.h
 Source3: hide_selinux.c
 
+# avoid an invalid timeout event on a reused handle (#679709)
+Patch1: 0001-curl-7.21.3-f551aa5.patch
+
 # Avoid buffer overflow report from glibc with FORTIFY_SOURCE
 Patch5: 0005-curl-7.21.3-tftpd-buffer-overflow.patch
 
@@ -109,7 +112,8 @@ for f in CHANGES README; do
     mv -f ${f}.utf8 ${f}
 done
 
-# upstream patches (not yet applied)
+# upstream patches (already applied)
+%patch1 -p1
 %patch5 -p1
 
 # Fedora patches
@@ -224,7 +228,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/aclocal/libcurl.m4
 
 %changelog
-* Sat Apr 16 2011 Peter Robinson <pbrobinson at gmail.com> 7.21.3-5
+* Wed Jun 08 2011 Kamil Dudka <kdudka at redhat.com> 7.21.3-7
+- avoid an invalid timeout event on a reused handle (#679709)
+
+* Sat Apr 16 2011 Peter Robinson <pbrobinson at gmail.com> 7.21.3-6
 - no valgrind on ARMv5 arches
 
 * Sat Mar 05 2011 Kamil Dudka <kdudka at redhat.com> 7.21.3-5


More information about the scm-commits mailing list