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

Diff for /src/usr.bin/ssh/channels.c between version 1.144 and 1.145

version 1.144, 2001/12/06 18:02:32 version 1.145, 2001/12/06 18:09:23
Line 2544 
Line 2544 
          * Connect to an inet socket.  The DISPLAY value is supposedly           * Connect to an inet socket.  The DISPLAY value is supposedly
          * hostname:d[.s], where hostname may also be numeric IP address.           * hostname:d[.s], where hostname may also be numeric IP address.
          */           */
         strncpy(buf, display, sizeof(buf));          strlcpy(buf, display, sizeof(buf));
         buf[sizeof(buf) - 1] = 0;  
         cp = strchr(buf, ':');          cp = strchr(buf, ':');
         if (!cp) {          if (!cp) {
                 error("Could not find ':' in DISPLAY: %.100s", display);                  error("Could not find ':' in DISPLAY: %.100s", display);
Line 2828 
Line 2827 
         /* Bind it to the name. */          /* Bind it to the name. */
         memset(&sunaddr, 0, sizeof(sunaddr));          memset(&sunaddr, 0, sizeof(sunaddr));
         sunaddr.sun_family = AF_UNIX;          sunaddr.sun_family = AF_UNIX;
         strncpy(sunaddr.sun_path, auth_sock_name,          strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path));
                 sizeof(sunaddr.sun_path));  
   
         if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)          if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)
                 packet_disconnect("bind: %.100s", strerror(errno));                  packet_disconnect("bind: %.100s", strerror(errno));

Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145