diff --git a/libproxy-0.4.12-use-correct-delete.patch b/libproxy-0.4.12-use-correct-delete.patch new file mode 100644 index 0000000..d1afb30 --- /dev/null +++ b/libproxy-0.4.12-use-correct-delete.patch @@ -0,0 +1,62 @@ +From 6efcbd3fa0944b499180c7bc860d38c1b18c97f1 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Tue, 16 Feb 2016 22:13:56 +0100 +Subject: [PATCH] Fix mismatched new[]/delete in pacrunner_natus and _webkit + +--- + libproxy/modules/pacrunner_natus.cpp | 4 ++-- + libproxy/modules/pacrunner_webkit.cpp | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libproxy/modules/pacrunner_natus.cpp b/libproxy/modules/pacrunner_natus.cpp +index ce79943..72ef6ff 100644 +--- a/libproxy/modules/pacrunner_natus.cpp ++++ b/libproxy/modules/pacrunner_natus.cpp +@@ -43,14 +43,14 @@ static Value dnsResolve(Value& ths, Value& fnc, vector& arg) { + NULL, 0, + NI_NUMERICHOST)) { + freeaddrinfo(info); +- delete tmp; ++ delete[] tmp; + return NULL; + } + freeaddrinfo(info); + + // Create the return value + Value ret = ths.newString(tmp); +- delete tmp; ++ delete[] tmp; + return ret; + } + +diff --git a/libproxy/modules/pacrunner_webkit.cpp b/libproxy/modules/pacrunner_webkit.cpp +index c51b869..bef2056 100644 +--- a/libproxy/modules/pacrunner_webkit.cpp ++++ b/libproxy/modules/pacrunner_webkit.cpp +@@ -58,7 +58,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef + struct addrinfo *info; + if (getaddrinfo(tmp, NULL, NULL, &info)) + return NULL; +- delete tmp; ++ delete[] tmp; + + // Try for IPv4 + tmp = new char[INET6_ADDRSTRLEN+1]; +@@ -67,7 +67,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef + NULL, 0, + NI_NUMERICHOST)) { + freeaddrinfo(info); +- delete tmp; ++ delete[] tmp; + return NULL; + } + freeaddrinfo(info); +@@ -76,7 +76,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef + JSStringRef str = JSStringCreateWithUTF8CString(tmp); + JSValueRef ret = JSValueMakeString(ctx, str); + JSStringRelease(str); +- delete tmp; ++ delete[] tmp; + + return ret; + } diff --git a/libproxy.spec b/libproxy.spec index e49d986..2662e51 100644 --- a/libproxy.spec +++ b/libproxy.spec @@ -15,6 +15,7 @@ Source0: https://github.com/libproxy/%{name}/archive/%{version}.tar.gz Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch # Taken from upstream git. Patch1: libproxy-0.4.12-javascriptcoregtk4.patch +Patch2: libproxy-0.4.12-use-correct-delete.patch BuildRequires: python2-devel BuildRequires: libmodman-devel >= 2.0.1 @@ -145,6 +146,7 @@ developing applications that use %{name}. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %{cmake} \ @@ -223,6 +225,7 @@ make test - Use license macro for COPYING - Use pkgconfig for BuildRequires - Use javascriptcoregtk-4.0 +- Apply an upstream patch to pair new[] with delete[] * Thu Feb 04 2016 Fedora Release Engineering - 0.4.11-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild