Hello community, here is the log from the commit of package libcares2 for openSUSE:Factory checked in at Tue Oct 18 14:19:38 CEST 2011.
-------- --- openSUSE:Factory/libcares2/libcares2.changes 2011-09-23 02:07:54.000000000 +0200 +++ /mounts/work_src_done/STABLE/libcares2/libcares2.changes 2011-10-17 05:32:47.000000000 +0200 @@ -1,0 +2,9 @@ +Mon Oct 17 03:29:31 UTC 2011 - crrodrig...@opensuse.org + +- Cherry-pick 3 patches from HEAD + * ares_destroy.c: fix segfault in ares_destroy_options() + * ares_getnameinfo: fix random results, memory corruption + * ares_init.c: fix segfault triggered in ares_init_options() + upon previous failure of init_by_defaults() + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- 0001-ares_destroy.c-fix-segfault-in-ares_destroy_options.patch 0002-ares_getnameinfo-fix-random-results-with-c-ares-1.7..patch 0003-ares_init.c-fix-segfault-triggered-in-ares_init_opti.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcares2.spec ++++++ --- /var/tmp/diff_new_pack.z9v89M/_old 2011-10-18 14:19:35.000000000 +0200 +++ /var/tmp/diff_new_pack.z9v89M/_new 2011-10-18 14:19:35.000000000 +0200 @@ -29,6 +29,9 @@ Source2: baselibs.conf BuildRequires: pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch1: 0001-ares_destroy.c-fix-segfault-in-ares_destroy_options.patch +Patch2: 0002-ares_getnameinfo-fix-random-results-with-c-ares-1.7..patch +Patch3: 0003-ares_init.c-fix-segfault-triggered-in-ares_init_opti.patch %description c-ares is a C library that performs DNS requests and name resolves @@ -49,6 +52,9 @@ %prep %setup -q -n %{pkg_name}-%{version} +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic ++++++ 0001-ares_destroy.c-fix-segfault-in-ares_destroy_options.patch ++++++ >From 5662ee94d2c55b0438679939c294870ec965cfda Mon Sep 17 00:00:00 2001 From: Yang Tse <yangs...@gmail.com> Date: Sun, 21 Aug 2011 16:41:43 +0200 Subject: [PATCH 1/3] ares_destroy.c: fix segfault in ares_destroy_options() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cristian Rodríguez <crrodrig...@opensuse.org> --- ares_destroy.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ares_destroy.c b/ares_destroy.c index 5e274da..a3f6ea2 100644 --- a/ares_destroy.c +++ b/ares_destroy.c @@ -1,6 +1,6 @@ /* Copyright 1998 by the Massachusetts Institute of Technology. - * Copyright (C) 2004-2010 by Daniel Stenberg + * Copyright (C) 2004-2011 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -29,10 +29,12 @@ void ares_destroy_options(struct ares_options *options) free(options->servers); for (i = 0; i < options->ndomains; i++) free(options->domains[i]); - free(options->domains); + if(options->domains) + free(options->domains); if(options->sortlist) free(options->sortlist); - free(options->lookups); + if(options->lookups) + free(options->lookups); } void ares_destroy(ares_channel channel) -- 1.7.4.1 ++++++ 0002-ares_getnameinfo-fix-random-results-with-c-ares-1.7..patch ++++++ >From a529199abfceae2f6a813616ced29b23d911d91e Mon Sep 17 00:00:00 2001 From: Denis Bilenko <denis.bile...@gmail.com> Date: Wed, 24 Aug 2011 18:37:11 +0200 Subject: [PATCH 2/3] ares_getnameinfo: fix random results with c-ares 1.7.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In ares_getnameinfo memcpy did not copy enough bytes, causing it to return arbitrary memory contents as a result. Signed-off-by: Cristian Rodríguez <crrodrig...@opensuse.org> --- ares_getnameinfo.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index 82e261d..cdcd516 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -188,7 +188,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, if (sa->sa_family == AF_INET) { niquery->family = AF_INET; - memcpy(&niquery->addr.addr4, addr, sizeof(struct in_addr)); + memcpy(&niquery->addr.addr4, addr, sizeof(niquery->addr.addr4)); ares_gethostbyaddr(channel, &addr->sin_addr, sizeof(struct in_addr), AF_INET, nameinfo_callback, niquery); @@ -196,7 +196,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, else { niquery->family = AF_INET6; - memcpy(&niquery->addr.addr6, addr6, sizeof(struct ares_in6_addr)); + memcpy(&niquery->addr.addr6, addr6, sizeof(niquery->addr.addr6)); ares_gethostbyaddr(channel, &addr6->sin6_addr, sizeof(struct ares_in6_addr), AF_INET6, nameinfo_callback, niquery); -- 1.7.4.1 ++++++ 0003-ares_init.c-fix-segfault-triggered-in-ares_init_opti.patch ++++++ >From 8f917639055e4e190c6045afffa65cb56caa5463 Mon Sep 17 00:00:00 2001 From: Yang Tse <yangs...@gmail.com> Date: Wed, 7 Sep 2011 00:30:53 +0200 Subject: [PATCH 3/3] ares_init.c: fix segfault triggered in ares_init_options() upon previous failure of init_by_defaults() and incomplete cleanup there. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cristian Rodríguez <crrodrig...@opensuse.org> --- ares_init.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ares_init.c b/ares_init.c index 44d4cf9..e163289 100644 --- a/ares_init.c +++ b/ares_init.c @@ -1249,15 +1249,22 @@ static int init_by_defaults(ares_channel channel) error: if(rc) { - if(channel->servers) + if(channel->servers) { free(channel->servers); + channel->servers = NULL; + } if(channel->domains && channel->domains[0]) free(channel->domains[0]); - if(channel->domains) + if(channel->domains) { free(channel->domains); - if(channel->lookups) + channel->domains = NULL; + } + + if(channel->lookups) { free(channel->lookups); + channel->lookups = NULL; + } } if(hostname) -- 1.7.4.1 continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org