commit libcares2 for openSUSE:Factory
Hello community, here is the log from the commit of package libcares2 for openSUSE:Factory checked in at Tue Nov 2 13:17:09 CET 2010. -------- --- libcares2/libcares2.changes 2010-07-25 21:04:14.000000000 +0200 +++ /mounts/work_src_done/STABLE/libcares2/libcares2.changes 2010-10-29 18:52:35.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Oct 29 16:51:25 UTC 2010 - cristian.rodriguez@opensuse.org + +- Fix aliasing warning in gcc +- Add missing break that caused get_ares_servers to fail + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- 0002-Fix-aliasing-warning-in-gcc-4.4.4-at-least.patch 0003-Add-missing-break-that-caused-get_ares_servers-to-fa.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcares2.spec ++++++ --- /var/tmp/diff_new_pack.8mYvQR/_old 2010-11-02 13:16:29.000000000 +0100 +++ /var/tmp/diff_new_pack.8mYvQR/_new 2010-11-02 13:16:29.000000000 +0100 @@ -22,7 +22,7 @@ Name: libcares2 Version: 1.7.3 -Release: 1 +Release: 2 License: MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Libraries/C and C++ @@ -30,7 +30,9 @@ Source: http://daniel.haxx.se/projects/c-ares/%{pkg_name}-%{version}.tar.bz2 Source2: baselibs.conf BuildRequires: pkg-config -Patch: 0001-fix-memory-leak-in-ares_getnameinfo.patch +Patch0: 0001-fix-memory-leak-in-ares_getnameinfo.patch +Patch1: 0002-Fix-aliasing-warning-in-gcc-4.4.4-at-least.patch +Patch2: 0003-Add-missing-break-that-caused-get_ares_servers-to-fa.patch %description c-ares is a C library that performs DNS requests and name resolves @@ -50,7 +52,9 @@ %prep %setup -q -n %{pkg_name}-%{version} -%patch -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic ++++++ 0001-fix-memory-leak-in-ares_getnameinfo.patch ++++++ --- /var/tmp/diff_new_pack.8mYvQR/_old 2010-11-02 13:16:29.000000000 +0100 +++ /var/tmp/diff_new_pack.8mYvQR/_new 2010-11-02 13:16:29.000000000 +0100 @@ -1,8 +1,13 @@ -From c93018913b91bf7c4699ff5badff5dcc91e8145f Mon Sep 17 00:00:00 2001 +From 40230cf46163d4ea01e6541b60076fb494245d90 Mon Sep 17 00:00:00 2001 From: Andrew C. Morrow <andrew.c.morrow@gmail.com> Date: Wed, 16 Jun 2010 10:18:24 +0800 -Subject: [PATCH] fix memory leak in ares_getnameinfo +Subject: [PATCH 1/3] fix memory leak in ares_getnameinfo +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Cristian Rodríguez <cristian.rodriguez@opensuse.org> --- ares_getnameinfo.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) @@ -28,5 +33,5 @@ } niquery->callback(niquery->arg, status, niquery->timeouts, NULL, NULL); -- -1.6.0.2 +1.7.3.1 ++++++ 0002-Fix-aliasing-warning-in-gcc-4.4.4-at-least.patch ++++++
From 7b8ec4c1aeb4f2237b85107b2746d8b0a4be055b Mon Sep 17 00:00:00 2001 From: Ben Greear <greearb@candelatech.com> Date: Sat, 31 Jul 2010 07:10:23 -0700 Subject: [PATCH 2/3] Fix aliasing warning in gcc 4.4.4 (at least). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Should be no functional change, though the code gets a bit ugglier. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Cristian Rodríguez <cristian.rodriguez@opensuse.org> --- ares_process.c | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ares_process.c b/ares_process.c index 3ef1ddb..fbe857a 100644 --- a/ares_process.c +++ b/ares_process.c @@ -435,11 +435,15 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, unsigned char buf[PACKETSZ + 1]; #ifdef HAVE_RECVFROM ares_socklen_t fromlen; +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE + struct sockaddr_storage from; +#else union { struct sockaddr_in sa4; struct sockaddr_in6 sa6; } from; #endif +#endif if(!read_fds && (read_fd == ARES_SOCKET_BAD)) /* no possible action */ @@ -474,10 +478,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, * packets as we can. */ do { #ifdef HAVE_RECVFROM - if (server->addr.family == AF_INET) - fromlen = sizeof(from.sa4); - else - fromlen = sizeof(from.sa6); + fromlen = sizeof(from); /* doesn't matter if it's larger than needed */ count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf), 0, (struct sockaddr *)&from, &fromlen); #else @@ -488,7 +489,15 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, else if (count <= 0) handle_error(channel, i, now); #ifdef HAVE_RECVFROM - else if (!same_address((struct sockaddr *)&from, &server->addr)) +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE + /* This family hack works around compiler warnings about + * aliases. + */ + else if (!((from.ss_family == server->addr.family) && + same_address((struct sockaddr *)&from, &server->addr))) +#else + else if (!same_address((struct sockaddr *)&from, &server->addr))) +#endif /* The address the response comes from does not match * the address we sent the request to. Someone may be * attempting to perform a cache poisoning attack. */ @@ -1147,8 +1156,10 @@ static int same_address(struct sockaddr *sa, struct ares_addr *aa) void *addr1; void *addr2; +#ifndef HAVE_STRUCT_SOCKADDR_STORAGE if (sa->sa_family == aa->family) { +#endif switch (aa->family) { case AF_INET: @@ -1166,7 +1177,9 @@ static int same_address(struct sockaddr *sa, struct ares_addr *aa) default: break; } +#ifndef HAVE_STRUCT_SOCKADDR_STORAGE } +#endif return 0; /* different */ } -- 1.7.3.1 ++++++ 0003-Add-missing-break-that-caused-get_ares_servers-to-fa.patch ++++++
From f04d0298e0885f9f0dacc93240c500e28c2c0a82 Mon Sep 17 00:00:00 2001 From: Ben Greear <greearb@candelatech.com> Date: Tue, 24 Aug 2010 16:48:47 -0700 Subject: [PATCH 3/3] Add missing break that caused get_ares_servers to fail. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
Reported-by: Ning Dong <flintning@163.com> Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Cristian Rodríguez <cristian.rodriguez@opensuse.org> --- ares_data.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ares_data.c b/ares_data.c index 6b6fae8..a2477be 100644 --- a/ares_data.c +++ b/ares_data.c @@ -145,7 +145,8 @@ void *ares_malloc_data(ares_datatype type) ptr->data.addr_node.next = NULL; ptr->data.addr_node.family = 0; memset(&ptr->data.addr_node.addrV6, 0, - sizeof(ptr->data.addr_node.addrV6)); + sizeof(ptr->data.addr_node.addrV6)); + break; default: free(ptr); -- 1.7.3.1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de