rpms/adns/devel adns14-rh514838.patch,NONE,1.1 adns.spec,1.18,1.19

Adam Tkac atkac at fedoraproject.org
Thu Aug 6 12:03:20 UTC 2009


Author: atkac

Update of /cvs/pkgs/rpms/adns/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22634

Modified Files:
	adns.spec 
Added Files:
	adns14-rh514838.patch 
Log Message:
- return empty string instead of NULL from adns_strerror (#514838)


adns14-rh514838.patch:
 general.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE adns14-rh514838.patch ---
diff -up adns-1.4/src/general.c.rh514838 adns-1.4/src/general.c
--- adns-1.4/src/general.c.rh514838	2006-04-08 16:36:57.000000000 +0200
+++ adns-1.4/src/general.c	2009-08-06 13:55:06.752562767 +0200
@@ -267,6 +267,8 @@ static const struct sinfo {
   SINFO( nodata,              "No such data"                                 )
 };
 
+static const char *unknown_error_str = "unknown error code";
+
 static int si_compar(const void *key, const void *elem) {
   const adns_status *st= key;
   const struct sinfo *si= elem;
@@ -283,7 +285,7 @@ const char *adns_strerror(adns_status st
   const struct sinfo *si;
 
   si= findsinfo(st);
-  return si->string;
+  return (si == NULL) ? unknown_error_str : si->string;
 }
 
 const char *adns_errabbrev(adns_status st) {


Index: adns.spec
===================================================================
RCS file: /cvs/pkgs/rpms/adns/devel/adns.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- adns.spec	24 Jul 2009 16:36:07 -0000	1.18
+++ adns.spec	6 Aug 2009 12:03:19 -0000	1.19
@@ -1,6 +1,6 @@
 Name:		adns
 Version:	1.4
-Release:	6%{?dist}
+Release:	7%{?dist}
 
 Summary:	Advanced, easy to use, asynchronous-capable DNS client library
 
@@ -11,6 +11,8 @@ Source0:        ftp://ftp.chiark.greenen
 BuildRequires:	autoconf
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:		adns14-rh514838.patch
+
 %description
 adns is a resolver library for C (and C++) programs. In contrast with
 the existing interfaces, gethostbyname et al and libresolv, it has the
@@ -69,6 +71,8 @@ programs for use from the command line a
 %prep
 %setup -q
 
+%patch0 -p1 -b .rh514838
+
 %build
 %ifarch sparcv9 sparc64 s390 s390x
 export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC"
@@ -111,6 +115,9 @@ rm -fr $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/*
 
 %changelog
+* Thu Aug 06 2009 Adam Tkac <atkac redhat com> 1.4-7
+- return empty string instead of NULL from adns_strerror (#514838)
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list