Subject: Re: pkg/16683: [net/bind8] libbind has a small bug (may crash)
To: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
From: None <iseki@gongon.com>
List: netbsd-bugs
Date: 05/09/2002 00:47:40
Kambe-san,
I agree. I've reviewd the code again and tested it in my
environment. My test result is no problem.
Isao
> > The bug is reproduced NetBSD's telnet with libbind of BIND version
> > 8.3.1.
> > >Fix:
> > src/lib/irs/getaddrinfo.c:323
> > - struct addrinfo ai, ai0, *afai;
> > + struct addrinfo ai, ai0, *afai = 0; /* fine work */
>
> "afai"'s value will set later at line 496.
>
> error = explore_fqdn(pai, hostname, servname, &afai);
>
> How about make explore_fqdn() always set last argument?
>
> --- lib/irs/getaddrinfo.c.orig Fri Nov 30 09:36:54 2001
> +++ lib/irs/getaddrinfo.c Wed May 8 23:55:34 2002
> @@ -602,7 +602,7 @@ explore_fqdn(pai, hostname, servname, re
> char tmp[NS_MAXDNAME];
> const char *cp;
>
> - result = NULL;
> + *res = NULL;
>
> /*
> * if the servname does not match socktype/protocol, ignore it.
>
> --
> Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
>