From 28fc300d2718abb506301c85a24d8a26dd4775bd Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 02 2015 13:20:16 +0000 Subject: import libproxy-0.4.11-8.el7 --- diff --git a/SOURCES/libproxy-0.4.11-crash.patch b/SOURCES/libproxy-0.4.11-crash.patch new file mode 100644 index 0000000..ed9f1a9 --- /dev/null +++ b/SOURCES/libproxy-0.4.11-crash.patch @@ -0,0 +1,41 @@ +diff -up libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash libproxy-0.4.11/libproxy/extension_pacrunner.cpp +--- libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash 2010-07-29 08:14:59.000000000 -0400 ++++ libproxy-0.4.11/libproxy/extension_pacrunner.cpp 2013-11-11 15:23:56.987266457 -0500 +@@ -22,20 +22,10 @@ using namespace libproxy; + + pacrunner::pacrunner(string, const url&) {} + +-pacrunner_extension::pacrunner_extension() { +- this->pr = NULL; +-} ++pacrunner_extension::pacrunner_extension() {} + +-pacrunner_extension::~pacrunner_extension() { +- if (this->pr) delete this->pr; +-} ++pacrunner_extension::~pacrunner_extension() {} + + pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) { +- if (this->pr) { +- if (this->last == pac) +- return this->pr; +- delete this->pr; +- } +- +- return this->pr = this->create(pac, pacurl); ++ return this->create(pac, pacurl); + } +diff -up libproxy-0.4.11/libproxy/proxy.cpp.crash libproxy-0.4.11/libproxy/proxy.cpp +--- libproxy-0.4.11/libproxy/proxy.cpp.crash 2013-11-11 15:25:27.309271353 -0500 ++++ libproxy-0.4.11/libproxy/proxy.cpp 2013-11-11 15:25:31.569271584 -0500 +@@ -416,7 +416,9 @@ void proxy_factory::run_pac(url &realurl + + /* Run the PAC, but only try one PACRunner */ + if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl; +- string pacresp = pacrunners[0]->get(this->pac, this->pacurl->to_string())->run(realurl); ++ pacrunner* runner = pacrunners[0]->get(this->pac, this->pacurl->to_string()); ++ string pacresp = runner->run(realurl); ++ delete runner; + if (debug) cerr << "Pacrunner returned: " << pacresp << endl; + format_pac_response(pacresp, response); + } diff --git a/SOURCES/libproxy-0.4.11-fdleak.patch b/SOURCES/libproxy-0.4.11-fdleak.patch new file mode 100644 index 0000000..28c0954 --- /dev/null +++ b/SOURCES/libproxy-0.4.11-fdleak.patch @@ -0,0 +1,20 @@ +diff -up libproxy-0.4.11/libproxy/url.cpp.fdleak libproxy-0.4.11/libproxy/url.cpp +--- libproxy-0.4.11/libproxy/url.cpp.fdleak 2013-09-19 08:45:48.718145364 -0400 ++++ libproxy-0.4.11/libproxy/url.cpp 2013-09-19 08:46:31.374147676 -0400 +@@ -403,6 +403,7 @@ char* url::get_pac() { + buffer = NULL; + } + } ++ close (sock); + return buffer; + } + +@@ -495,7 +496,7 @@ char* url::get_pac() { + } + + // Clean up +- shutdown(sock, SHUT_RDWR); ++ close(sock); + return buffer; + } + diff --git a/SPECS/libproxy.spec b/SPECS/libproxy.spec index fe4acba..2411453 100644 --- a/SPECS/libproxy.spec +++ b/SPECS/libproxy.spec @@ -12,7 +12,7 @@ Name: libproxy Version: 0.4.11 -Release: 6%{?svn}%{?dist} +Release: 8%{?svn}%{?dist} Summary: A library handling all the details of proxy configuration Group: System Environment/Libraries @@ -22,6 +22,8 @@ URL: http://code.google.com/p/libproxy/ Source0: http://libproxy.googlecode.com/files/libproxy-%{version}%{?svn}.tar.gz Patch0: libproxy-0.4.10-mozjs.patch Patch1: 0001-pacrunner_mozjs-Also-support-mozjs-17.0.patch +Patch3: libproxy-0.4.11-fdleak.patch +Patch4: libproxy-0.4.11-crash.patch BuildRequires: python-devel BuildRequires: libmodman-devel >= 2.0.1 @@ -173,6 +175,8 @@ developing applications that use %{name}. %setup -q %patch0 -p1 -b .orig %patch1 -p1 -b .orig +%patch3 -p1 -b .fdleak +%patch4 -p1 -b .crash %build %{cmake} \ @@ -269,6 +273,9 @@ make test %changelog +* Fri Mar 20 2015 Dan Winship - 0.4.11-8 +- Fix pacrunner crash (#1201658) + * Fri Jan 24 2014 Daniel Mach - 0.4.11-6 - Mass rebuild 2014-01-24