diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-06-15 22:43:58 -0400 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2011-06-16 10:46:25 +0200 |
commit | 5babac1535735419921ca9edbf5f6c96a40296da (patch) | |
tree | e7b13fd6f7f547df37936182e4aabd71e588659c | |
parent | fe6a22b68c40902e5bdf52c3c29979ec0eb58747 (diff) | |
download | glibc-5babac1535735419921ca9edbf5f6c96a40296da.tar.gz glibc-5babac1535735419921ca9edbf5f6c96a40296da.tar.xz glibc-5babac1535735419921ca9edbf5f6c96a40296da.zip |
Fix typo in recent resolver change which causes segvs
(cherry picked from commit 57912a71cc379f8582e3ea272782dc39c6c02e45)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | resolv/res_send.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index a08e0e1dcb..c29470ac74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-15 Ulrich Drepper <drepper@gmail.com> + + * resolv/res_send.c (__libc_res_nsend): Fix typos in last patch. We + need to dereference resplen2. + 2011-06-14 Andreas Schwab <schwab@redhat.com> * sysdeps/unix/sysv/linux/wordsize-64/dl-fxstatat64.c: New file. diff --git a/resolv/res_send.c b/resolv/res_send.c index 97142b7dd0..a001c1e753 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen, ns, ansp, ansp2, nansp2, resplen2); if (n < 0) return (-1); - if (n == 0 && (buf2 == NULL || resplen2 == 0)) + if (n == 0 && (buf2 == NULL || *resplen2 == 0)) goto next_ns; } else { /* Use datagrams. */ @@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen, ansp2, nansp2, resplen2); if (n < 0) return (-1); - if (n == 0 && (buf2 == NULL || resplen2 == 0)) + if (n == 0 && (buf2 == NULL || *resplen2 == 0)) goto next_ns; if (v_circuit) // XXX Check whether both requests failed or |