This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10452] New: send_dg(): first answer overwritten when it is SERVFAIL, NOTIMP or REFUSED


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]