SUMMARY: bug in gethostbyname()

From: Joe Habermann (haberman@s25.msi.umn.edu)
Date: Mon Feb 24 1992 - 20:19:37 CST


1) Has anyone else seen this?
Yes. Is a Known Bug. Everyone reported exactly the same
behavior.

2) Is there a patch?
No. It has been reported to Sun, however.

Thanks to all who responded:

* Bede W P Seymour (bws900@cscgpo.anu.edu.au)
  Zhou Shouben (zshouben@PCS.CNC.EDU)
* Hilarie Orman (ho@optima.cs.arizona.edu)
  Greg Lindahl (gl8f@fermi.clas.Virginia.EDU)
  Michael Helm (mike@fionn.lbl.gov)

  * -- have reported bug to Sun

The following is my original query.

Joe Habermann
haberman@msi.umn.edu

--
Newsgroups: info.sun-managers
Subject: bug in gethostbyname()
Summary: Bug in gethostbyname() for hosts w/>10 addrs -- patch avail?
Keywords: DNS hack gethostbyname libc network patch bug

There appears to be a bug in gethostbyname() in SunOS 4.1.{1,2}* (at least.) It goes something like this:

If you are running the makedbm -b/ypserv -i DNS hack, and gethostbyname() is passed a host that has >10 addresses, then the calling program will crash with a segmentation fault if the host is registered with DNS but not under NIS.

For example, 'ypmatch gw5.umn.edu hosts' will successfully return its 17 addresses, but 'ping gw5.umn.edu' will dump core.

1) Has anyone else seen this? 2) Is there a patch?

I am not interested in replies like "use the resolver versions of the get-host-entry routines."

Many thanks,

Joe Habermann haberman@msi.umn.edu --



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:37 CDT