NetBSD-Bugs archive

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

Re: lib/48926: gethostbyname(3) doesn't appear to work under NetBSD-5.2 and NetBSD-6.1.x when hostnames appear only in /etc/hosts



The following reply was made to PR lib/48926; it has been noted by GNATS.

From: "D'Arcy J.M. Cain" <darcy%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: christos%zoulas.com@localhost, lib-bug-people%netbsd.org@localhost, 
gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost, buhrow%nfbcal.org@localhost
Subject: Re: lib/48926: gethostbyname(3) doesn't appear to work under
 NetBSD-5.2 and NetBSD-6.1.x when hostnames appear only in /etc/hosts
Date: Mon, 23 Jun 2014 12:18:55 -0400

 On Mon, 23 Jun 2014 15:35:00 +0000 (UTC)
 christos%zoulas.com@localhost (Christos Zoulas) wrote:
 >  |  What about checking whether p[len -1] is blankish first?
 
 Especially since comment processing can make this situation more likely.
 Consider "BlahBlahBlah#oops\n"
 
 >  And len != 0 for the paranoid.
 
 Or do it all in one line.
 
 while (len && isspace(p[len - 1])) p[--len] = 0
 
 Also trims blanks at end of line.
 
 -- 
 D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
 http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost
 


Home | Main Index | Thread Index | Old Index