[BACK]Return to commands.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / telnet

Diff for /src/usr.bin/telnet/commands.c between version 1.18 and 1.19

version 1.18, 1998/07/09 06:32:10 version 1.19, 1998/07/16 18:55:59
Line 1676 
Line 1676 
                 if (strchr(hbuf, '.') == 0) {                  if (strchr(hbuf, '.') == 0) {
                         struct hostent *he = gethostbyname(hbuf);                          struct hostent *he = gethostbyname(hbuf);
                         if (he != 0)                          if (he != 0)
                                 strncpy(hbuf, he->h_name, sizeof hbuf);                                  strncpy(hbuf, he->h_name, sizeof hbuf-1);
                         hbuf[256] = '\0';                          hbuf[sizeof hbuf-1] = '\0';
                 }                  }
   
                 asprintf (&cp, "%s%s", hbuf, cp2);                  asprintf (&cp, "%s%s", hbuf, cp2);

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19