[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.145 and 1.146

version 1.145, 2022/01/21 00:53:40 version 1.146, 2022/08/19 04:02:46
Line 470 
Line 470 
                 return;                  return;
         }          }
   
           /*
            * Read the server banner as per RFC4253 section 4.2.  The "SSH-"
            * protocol identification string may be preceeded by an arbitarily
            * large banner which we must read and ignore.  Loop while reading
            * newline-terminated lines until we have one starting with "SSH-".
            * The ID string cannot be longer than 255 characters although the
            * preceeding banner lines may (in which case they'll be discarded
            * in multiple iterations of the outer loop).
            */
         for (;;) {          for (;;) {
                 memset(buf, '\0', sizeof(buf));                  memset(buf, '\0', sizeof(buf));
                 bufsiz = sizeof(buf);                  bufsiz = sizeof(buf);
Line 495 
Line 504 
                         break;                          break;
                 }                  }
                 conrecycle(s);                  conrecycle(s);
                   return;
           }
           if (cp >= buf + sizeof(buf)) {
                   error("%s: greeting exceeds allowable length", c->c_name);
                   confree(s);
                 return;                  return;
         }          }
         if (*cp != '\n' && *cp != '\r') {          if (*cp != '\n' && *cp != '\r') {

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