summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-02-12 13:56:30 +0000
committerAnthony G. Basile <blueness@gentoo.org>2013-02-12 13:56:30 +0000
commit2153cf3698bfbacfba1d5018f4bcd20411d65ef4 (patch)
treed1e54c0b8a0da772392f52c3689a94b424b61cfd /net-misc/curl/files
parentMigrate to distutils-r1. Clean up a bit. (diff)
downloadgentoo-2-2153cf3698bfbacfba1d5018f4bcd20411d65ef4.tar.gz
gentoo-2-2153cf3698bfbacfba1d5018f4bcd20411d65ef4.tar.bz2
gentoo-2-2153cf3698bfbacfba1d5018f4bcd20411d65ef4.zip
Fix null pointer ref, bug #456842
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'net-misc/curl/files')
-rw-r--r--net-misc/curl/files/curl-7.29.0-fix-null-pointer.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/net-misc/curl/files/curl-7.29.0-fix-null-pointer.patch b/net-misc/curl/files/curl-7.29.0-fix-null-pointer.patch
new file mode 100644
index 000000000000..3a20c8ab19b2
--- /dev/null
+++ b/net-misc/curl/files/curl-7.29.0-fix-null-pointer.patch
@@ -0,0 +1,28 @@
+Fix NULL pointer reference when closing an unused multi handle.
+
+This is commit da3fc1e from upstream, modulo test 1508.
+
+X-Gentoo-Bug: 456842
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/456842
+Reported-by: Thomas McShane <firewrks@yahoo.com>
+
+diff --git a/lib/multi.c b/lib/multi.c
+index fa0afb9..706df23 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -1773,10 +1773,12 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
+ /* Close all the connections in the connection cache */
+ close_all_connections(multi);
+
+- multi->closure_handle->dns.hostcache = multi->hostcache;
+- Curl_hostcache_clean(multi->closure_handle);
++ if(multi->closure_handle) {
++ multi->closure_handle->dns.hostcache = multi->hostcache;
++ Curl_hostcache_clean(multi->closure_handle);
+
+- Curl_close(multi->closure_handle);
++ Curl_close(multi->closure_handle);
++ }
+ multi->closure_handle = NULL;
+
+ Curl_hash_destroy(multi->sockhash);