Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <richard@atheist.tamu.edu>
Subject: a telnet bug and patch
Date: Sun, 24 Mar 1996 17:10:49 -0600 (CST)	[thread overview]
Message-ID: <m0u0yvz-0002IKC@atheist.tamu.edu> (raw)

The telnet from NetKit-B-0.06-7 has a 64-bit unsigned long problem
resolving hostnames.  I suppose, depending on how you define the
semantics of inet_addr failure, the problem could be in libc, but....

r~
-----

*** NetKit-B-0.06/telnet/commands.c.orig	Mon May 23 04:11:50 1994
--- NetKit-B-0.06/telnet/commands.c	Sun Mar 24 16:54:51 1996
***************
*** 2219,2225 ****
      } else {
  #endif
  	temp = inet_addr(hostp);
! 	if (temp != (unsigned long) -1) {
  	    sin.sin_addr.s_addr = temp;
  	    sin.sin_family = AF_INET;
  	    (void) strcpy(_hostname, hostp);
--- 2219,2225 ----
      } else {
  #endif
  	temp = inet_addr(hostp);
! 	if (temp != 0xFFFFFFFF) {
  	    sin.sin_addr.s_addr = temp;
  	    sin.sin_family = AF_INET;
  	    (void) strcpy(_hostname, hostp);

             reply	other threads:[~1996-03-24 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-24 23:10 Richard Henderson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-03-25  1:24 a telnet bug and patch David Mosberger-Tang
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox