lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV nytimes


From: Paul Kimoto
Subject: LYNX-DEV nytimes
Date: Mon, 28 Apr 1997 15:32:39 -0400

According to "finger", infomagic.com runs SunOS 4.1.3_U1, in which there is a
bug in gethostbyname().  It is discussed in the following message that I dug
up from DejaNews:

> Subject:      Re: Ping coredumping
> From:         Jefferson Ogata <address@hidden>
> Date:         1996/08/13
> Message-Id:   <address@hidden>
> Sender:       address@hidden
> X-Nntp-Posting-Host: localhost
> References:   <address@hidden>
> Content-Type: text/plain; charset=us-Ascii
> Organization: Philips Media Systems
> Mime-Version: 1.0
> Newsgroups:   comp.sys.sun.admin,comp.sys.sun.apps
> X-Mailer:     Mozilla 3.0b4 (X11; I; SunOS 4.1.3_U1 sun4m)
> 
> 
> This is from slowly fading memory, but I think I remember
> this right:
> 
> I had this problem with several programs on 4.1.3_U1. It
> seems that the libc code for gethostbyname(3) didn't fill out
> the h_addr[] array correctly when the host has multiple DNS
> A records. This resulted in a pointer error which would cause
> ping and sendmail to dump core when dealing with such a host.
> 
> You can investigate this with a short program that does a
> gethostbyname(). As I recall, when there's only one host,
> hostent->h_addr_list[0] is a pointer to a u_long containing
> the IP address of the host and hostent->h_addr_list[1] is NULL.
> When there is more than one A record, hostent->h_addr_list[0]
> is (incorrectly) a u_long containing the IP address of the
> first host, hostent->h_addr_list[1] is a u_long containing the
> second IP address, and so on. There's no trivial way to tell
> which situation you've got, but if you treat
> hostent->h_addr_list[0] as a pointer to a u_long, you typically
> end up with a segmentation fault. Since I had the problem in
> code I was debugging, I wasn't surprised when I found that ping
> and sendmail were dumping core dealing with the same
> multiple-DNS hosts.
> 
> There's a patch. For 4.1.3_U1 you need the domestic libc
> jumbo patch to fix this. The international version works too
> but does not contain any DES code. The domestic version is
> free from Sun, but you have to get it directly from them.
> 
> Apologies if my memory is faultier than I think it is...
> 
> -- 
> Jefferson Ogata           Philips Media Systems          address@hidden
>  Animals without backbones hid from each other or fell down. Clamasaurs
>   and oysterettes appeared as appetizers. Then came the sponges, which
>  sucked up about ten percent of all life."           - Firesign Theatre

For three or so days I have been (successfuly) running lynx-2.7.1 on SunOS
4.1.1 and 4.1.3_U1 with gethostbyname() calls replaced by a wrapper I wrote
to try to do the right thing.  Please write if anyone would like it sent
anywhere.

(N.B. I follow LYNX-DEV via the flora.org archives.)

        -Paul Kimoto <address@hidden>
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]