[unbound/f18] *add patch for #888759

Paul Wouters pwouters at fedoraproject.org
Fri Dec 21 03:30:37 UTC 2012


commit 9330687000ce5c6e633f7d56baead2a6c8a752ae
Author: Paul Wouters <pwouters at redhat.com>
Date:   Thu Dec 20 13:36:24 2012 -0500

    *add patch for #888759
    
    Conflicts:
    	unbound.spec

 unbound-1.4.19-888759.patch |   32 ++++++++++++++++++++++++++++++++
 unbound.spec                |    5 +++--
 2 files changed, 35 insertions(+), 2 deletions(-)
---
diff --git a/unbound-1.4.19-888759.patch b/unbound-1.4.19-888759.patch
new file mode 100644
index 0000000..bc86810
--- /dev/null
+++ b/unbound-1.4.19-888759.patch
@@ -0,0 +1,32 @@
+diff -Naur unbound-1.4.19-orig/smallapp/unbound-anchor.c unbound-1.4.19/smallapp/unbound-anchor.c
+--- unbound-1.4.19-orig/smallapp/unbound-anchor.c	2012-10-30 11:13:53.000000000 -0400
++++ unbound-1.4.19/smallapp/unbound-anchor.c	2012-12-20 13:18:11.048256192 -0500
+@@ -1503,6 +1503,20 @@
+ 	}
+ }
+ 
++/* Stop the parser when an entity declaration is encountered. For safety. */
++static void
++xml_entitydeclhandler(void *userData,
++	const XML_Char *ATTR_UNUSED(entityName),
++	int ATTR_UNUSED(is_parameter_entity),
++	const XML_Char *ATTR_UNUSED(value), int ATTR_UNUSED(value_length),
++	const XML_Char *ATTR_UNUSED(base),
++	const XML_Char *ATTR_UNUSED(systemId),
++	const XML_Char *ATTR_UNUSED(publicId),
++	const XML_Char *ATTR_UNUSED(notationName))
++{
++	XML_StopParser((XML_Parser)userData, XML_FALSE);
++}
++
+ /**
+  * XML parser setup of the callbacks for the tags
+  */
+@@ -1531,6 +1545,7 @@
+ 		if(verb) printf("out of memory\n");
+ 		exit(0);
+ 	}
++	XML_SetEntityDeclHandler(parser, xml_entitydeclhandler);
+ 	XML_SetElementHandler(parser, xml_startelem, xml_endelem);
+ 	XML_SetCharacterDataHandler(parser, xml_charhandle);
+ }
diff --git a/unbound.spec b/unbound.spec
index 23a07f0..70f5290 100644
--- a/unbound.spec
+++ b/unbound.spec
@@ -35,6 +35,7 @@ Source13: root.anchor
 Source14: unbound.sysconfig
 Source15: unbound-monthly.cron
 Source16: unbound-munin.README
+Patch1: unbound-1.4.19-888759.patch
 Group: System Environment/Daemons
 BuildRequires: flex, openssl-devel , ldns-devel >= 1.6.13
 BuildRequires: libevent-devel expat-devel
@@ -109,6 +110,7 @@ Python modules and extensions for unbound
 
 %prep
 %setup -q 
+%patch1 -p1 -b .888759
 
 %build
 %configure  --with-ldns= --with-libevent --with-pthreads --with-ssl \
@@ -194,12 +196,10 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/unbound/local.d/
 %{_sbindir}/unbound-control-setup
 %{_sbindir}/unbound-host
 %{_sbindir}/unbound-streamtcp
-
 %{_mandir}/man1/*
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 
-
 %if %{with_python}
 %files python
 %{python_sitearch}/*
@@ -272,6 +272,7 @@ exit 0
 %changelog
 * Wed Dec 19 2012 Paul Wouters <pwouters at redhat.com> - 1.4.19-1
 - Updated to 1.4.19, which incorporates all our patches
+- Patch for unbound-anchor (rhbz#888759)
 
 * Fri Nov 09 2012 Paul Wouters <pwouters at redhat.com> - 1.4.18-5
 - Patch to allow wildcards in include: statements


More information about the scm-commits mailing list