[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: Darren Tucker <dtucker_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Wed, 11 Jun 2008 18:03:50 -0600 (MDT)
CVSROOT: /cvs
Module name: src
Changes by: dtucker_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org 2008/06/11 18:03:50
Modified files:
usr.bin/ssh : dns.c canohost.c sshconnect.c
Log message:
Do not pass "0" strings as ports to getaddrinfo because the lookups
can slow things down and we never use the service info anyway. bz
#859, patch from YOSHIFUJI Hideaki and John Devitofranceschi. ok
deraadt@ djm@
djm belives that the reason for the "0" strings is to ensure that
it's not possible to call getaddrinfo with both host and port being
NULL. In the case of canohost.c host is a local array. In the
case of sshconnect.c, it's checked for null immediately before use.
In dns.c it ultimately comes from ssh.c:main() and is guaranteed to
be non-null but it's not obvious, so I added a warning message in
case it is ever passed a null.
Visit your host, monkey.org