This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10452] New: send_dg(): first answer overwritten when it is SERVFAIL, NOTIMP or REFUSED
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 26 Jul 2009 00:42:27 -0000
- Subject: [Bug libc/10452] New: send_dg(): first answer overwritten when it is SERVFAIL, NOTIMP or REFUSED
- Reply-to: sourceware-bugzilla at sourceware dot org
In the file resolv/res_send.c, function send_dg(), when the first answer is
received and corresponds to SERVFAIL, NOTIMP or REFUSED, resplen is set to 1 to
signify the error (line 1288). However for the second answer, the buffer start
is computed using resplen (line 1139), so it overwrites the first answer, and
most importantly the rcode part.
This causes strange behaviour in such cases given the first answer correspond
to the buffer of the second one, but shifted by one.
--
Summary: send_dg(): first answer overwritten when it is SERVFAIL,
NOTIMP or REFUSED
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: aurelien at aurel32 dot net
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=10452
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.