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

Diff for /src/usr.bin/ssh/ssh-keyscan.c between version 1.54 and 1.55

version 1.54, 2005/05/24 17:32:44 version 1.55, 2005/06/17 02:44:33
Line 167 
Line 167 
 static char *  static char *
 Linebuf_getline(Linebuf * lb)  Linebuf_getline(Linebuf * lb)
 {  {
         int n = 0;          size_t n = 0;
         void *p;          void *p;
   
         lb->lineno++;          lb->lineno++;
Line 484 
Line 484 
 static void  static void
 congreet(int s)  congreet(int s)
 {  {
         int remote_major = 0, remote_minor = 0;          int n = 0, remote_major = 0, remote_minor = 0;
         char buf[256], *cp;          char buf[256], *cp;
         char remote_version[sizeof buf];          char remote_version[sizeof buf];
         size_t bufsiz, n = 0;          size_t bufsiz;
         con *c = &fdcon[s];          con *c = &fdcon[s];
   
         bufsiz = sizeof(buf);          bufsiz = sizeof(buf);
Line 537 
Line 537 
         n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n",          n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n",
             c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2,              c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2,
             c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2);              c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2);
         if (n == -1 || n >= sizeof buf) {          if (n < 0 || (size_t)n >= sizeof(buf)) {
                 error("snprintf: buffer too small");                  error("snprintf: buffer too small");
                 confree(s);                  confree(s);
                 return;                  return;
         }          }
         if (atomicio(vwrite, s, buf, n) != n) {          if (atomicio(vwrite, s, buf, n) != (size_t)n) {
                 error("write (%s): %s", c->c_name, strerror(errno));                  error("write (%s): %s", c->c_name, strerror(errno));
                 confree(s);                  confree(s);
                 return;                  return;

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55