From maurer@amasol.de  Fri Sep 20 10:25:08 2002
Return-Path: <maurer@amasol.de>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7198F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Sep 2002 10:25:08 -0700 (PDT)
Received: from mrburns.amasol.de (mrburns.amasol.de [212.14.71.194])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4166143E3B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Sep 2002 10:25:07 -0700 (PDT)
	(envelope-from maurer@amasol.de)
Received: from mrburns.amasol.de (maurer@localhost.amasol.de [127.0.0.1])
        by mrburns.amasol.de (8.12.6/8.12.6) with ESMTP id g8KHP5HJ010611
        (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO)
        for <FreeBSD-gnats-submit@freebsd.org> (sender <maurer@amasol.de>);
        Fri, 20 Sep 2002 19:25:05 +0200 (CEST)
Received: (from maurer@localhost)
	by mrburns.amasol.de (8.12.6/8.12.6/Submit) id g8KHP58K010610;
	Fri, 20 Sep 2002 19:25:05 +0200 (CEST)
	(envelope-from maurer@amasol.de)
Message-Id: <200209201725.g8KHP58K010610@mrburns.amasol.de>
Date: Fri, 20 Sep 2002 19:25:05 +0200 (CEST)
From: Hans Maurer <maurer@amasol.de>
Reply-To: Hans Maurer <maurer@amasol.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Pointer bug in getaddrinfo.c 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         43136
>Category:       misc
>Synopsis:       Pointer bug in getaddrinfo.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    nectar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 20 10:30:01 PDT 2002
>Closed-Date:    Mon Sep 30 11:12:07 PDT 2002
>Last-Modified:  Mon Sep 30 11:12:07 PDT 2002
>Originator:     Hans Maurer
>Release:        FreeBSD 4.7-RC i386
>Organization:
>Environment:
System: FreeBSD mrburns.amasol.de 4.7-RC FreeBSD 4.7-RC #5: Fri Sep 20 10:39:35 CEST 2002 root@mrburns.amasol.de:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
In /usr/src/lib/libc/net/getaddrinfo.c, buf and buf2 have changed to pointer
types between revision 1.9.2.9 and 1.9.2.10.  However, one statement was
overlooked in the process, which causes getaddrinfo to fail on DNS queries.

I noticed when tcp_wrapper wouldn't accept host name in hosts.allow anymore.
	
>How-To-Repeat:
tcpdmatch ftpd ftp.freebsd.org or any other getaddrinfo call.
	
>Fix:
*** lib/libc/net/getaddrinfo.c.orig	Thu Sep 19 16:41:46 2002
--- lib/libc/net/getaddrinfo.c	Fri Sep 20 19:16:40 2002
***************
*** 1460,1466 ****
  		free(buf2);
  		return EAI_NODATA;
  	}
! 	ai = getanswer(&buf, q.n, q.name, q.qtype, pai);
  	if (ai) {
  		cur->ai_next = ai;
  		while (cur && cur->ai_next)
--- 1460,1466 ----
  		free(buf2);
  		return EAI_NODATA;
  	}
! 	ai = getanswer(buf, q.n, q.name, q.qtype, pai);
  	if (ai) {
  		cur->ai_next = ai;
  		while (cur && cur->ai_next)

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->nectar 
Responsible-Changed-By: ume 
Responsible-Changed-When: Sat Sep 21 13:50:44 PDT 2002 
Responsible-Changed-Why:  
It seems that it was overlooked during your MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43136 
State-Changed-From-To: open->closed 
State-Changed-By: nectar 
State-Changed-When: Mon Sep 30 11:10:50 PDT 2002 
State-Changed-Why:  
This was corrected in revision 1.9.2.11 of  
src/lib/libc/net/getaddrinfo.c 
Thanks for reporting it! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43136 
>Unformatted:
