From e7456d7df4d5f5276ed6f68dcaf09c527d0068c2 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 25 Jul 2012 14:32:59 -0600 Subject: [PATCH] - Revert recent changes to res_send (804630, 835090). - Fix memcpy args in res_send (#841787). --- glibc-rh804630.patch | 23 ----------------------- glibc-rh841787.patch | 12 ++++++++++++ 2 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 glibc-rh804630.patch create mode 100644 glibc-rh841787.patch diff --git a/glibc-rh804630.patch b/glibc-rh804630.patch deleted file mode 100644 index 75dbe94..0000000 --- a/glibc-rh804630.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -rup c/resolv/res_send.c d/resolv/res_send.c ---- c/resolv/res_send.c 2012-01-01 05:16:32.000000000 -0700 -+++ d/resolv/res_send.c 2012-03-30 12:39:30.862467628 -0600 -@@ -409,6 +409,7 @@ __libc_res_nsend(res_state statp, const - */ - if (EXT(statp).nsinit == 0) { - unsigned char map[MAXNS]; -+ unsigned int ext_total_nscount; - - memset (map, MAXNS, sizeof (map)); - for (n = 0; n < MAXNS; n++) { -@@ -422,8 +423,9 @@ __libc_res_nsend(res_state statp, const - } - } - n = statp->nscount; -- if (statp->nscount > EXT(statp).nscount) -- for (n = EXT(statp).nscount, ns = 0; -+ ext_total_nscount = EXT(statp).nscount + EXT(statp).nscount6; -+ if (statp->nscount > ext_total_nscount) -+ for (n = ext_total_nscount, ns = 0; - n < statp->nscount; n++) { - while (ns < MAXNS - && EXT(statp).nsmap[ns] != MAXNS) diff --git a/glibc-rh841787.patch b/glibc-rh841787.patch new file mode 100644 index 0000000..331a203 --- /dev/null +++ b/glibc-rh841787.patch @@ -0,0 +1,12 @@ +diff -rup a/resolv/res_send.c b/resolv/res_send.c +--- a/resolv/res_send.c 2010-05-04 05:27:23.000000000 -0600 ++++ b/resolv/res_send.c 2012-03-01 12:11:13.065605342 -0700 +@@ -441,7 +441,7 @@ __libc_res_nsend(res_state statp, const + malloc(sizeof (struct sockaddr_in6)); + if (EXT(statp).nsaddrs[n] != NULL) { + memset (mempcpy(EXT(statp).nsaddrs[n], +- &statp->nsaddr_list[n], ++ &statp->nsaddr_list[ns], + sizeof (struct sockaddr_in)), + '\0', + sizeof (struct sockaddr_in6)