Re: oaf gethostby* bug
- From: Elliot Lee <sopwith redhat com>
- To: Dan Winship <danw helixcode com>
- Cc: gnome-components-list gnome org
- Subject: Re: oaf gethostby* bug
- Date: Thu, 14 Sep 2000 12:39:13 -0400 (EDT)
On Wed, 13 Sep 2000, Dan Winship wrote:
> oaf_hostname_get assumes it can pass the result of gethostbyname as an
> argument to gethostbyaddr, which is not safe, since they might be
> using the same static buffer. Mmmm... static data.
Nice spotting.
Assuming AF_INET etc. is probably broken. For example, this thing is not
going to work for IPv6-only hosts, and if having a different FQDN for
different networking protocols is legal, the existence of
oaf_hostname_get() at all would be a problem. This is not all your fault,
just something I noticed.
Should switch to using getaddrinfo() and getnameinfo() in any case, to
handle IPv6 etc.
-- Elliot
DEAR IRS, Please cancel my subscription.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]