From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6173 invoked by alias); 26 Jul 2009 00:42:42 -0000 Received: (qmail 6090 invoked by uid 48); 26 Jul 2009 00:42:27 -0000 Date: Sun, 26 Jul 2009 00:42:00 -0000 From: "aurelien at aurel32 dot net" To: glibc-bugs@sources.redhat.com Message-ID: <20090726004225.10452.aurelien@aurel32.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/10452] New: send_dg(): first answer overwritten when it is SERVFAIL, NOTIMP or REFUSED X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00097.txt.bz2 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.