[arch-commits] Commit in curl/trunk (2 files)

Dave Reisner dreisner at nymeria.archlinux.org
Mon Feb 11 11:07:14 UTC 2013


    Date: Monday, February 11, 2013 @ 12:07:14
  Author: dreisner
Revision: 177927

upgpkg: curl 7.29.0-2

- backport fix for NULL deference (FS#33811, FS#33779)

Added:
  curl/trunk/0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch
Modified:
  curl/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch |   39 ++++++++++
 PKGBUILD                                                        |    6 +
 2 files changed, 44 insertions(+), 1 deletion(-)

Added: 0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch
===================================================================
--- 0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch	                        (rev 0)
+++ 0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch	2013-02-11 11:07:14 UTC (rev 177927)
@@ -0,0 +1,39 @@
+From da3fc1ee91de656a30f3a12de394bcba55119872 Mon Sep 17 00:00:00 2001
+From: Linus Nielsen Feltzing <linus at haxx.se>
+Date: Sun, 10 Feb 2013 22:57:58 +0100
+Subject: [PATCH] Fix NULL pointer reference when closing an unused multi
+ handle.
+
+---
+ lib/multi.c                |  8 +++++---
+ tests/data/Makefile.am     |  1 +
+ tests/data/test1508        | 31 +++++++++++++++++++++++++++++
+ tests/libtest/Makefile.inc |  6 +++++-
+ tests/libtest/lib1508.c    | 49 ++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 91 insertions(+), 4 deletions(-)
+ create mode 100644 tests/data/test1508
+ create mode 100644 tests/libtest/lib1508.c
+
+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);
+-- 
+1.8.1.3
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-11 02:54:48 UTC (rev 177926)
+++ PKGBUILD	2013-02-11 11:07:14 UTC (rev 177927)
@@ -7,7 +7,7 @@
 
 pkgname=curl
 pkgver=7.29.0
-pkgrel=1
+pkgrel=2
 pkgdesc="An URL retrieval utility and library"
 arch=('i686' 'x86_64')
 url="http://curl.haxx.se"
@@ -15,9 +15,11 @@
 depends=('ca-certificates' 'libssh2' 'openssl' 'zlib')
 options=('!libtool')
 source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc}
+        0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch
         curlbuild.h)
 md5sums=('4f57d3b4a3963038bd5e04dbff385390'
          '6283fbb36933cf8720acc34c43169f1d'
+         '5bfd1899e8b19cfdd78774f6337f8b47'
          '751bd433ede935c8fae727377625a8ae')
 
 ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d')
@@ -32,6 +34,8 @@
 build() {
   cd "$pkgname-$pkgver"
 
+  patch -Np1 <"$srcdir/0001-Fix-NULL-pointer-reference-when-closing-an-unused-mu.patch"
+
   ./configure \
       --prefix=/usr \
       --mandir=/usr/share/man \




More information about the arch-commits mailing list