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

Diff for /src/usr.bin/ssh/sftp-client.c between version 1.127 and 1.128

version 1.127, 2017/08/11 04:41:08 version 1.128, 2017/11/28 21:10:22
Line 116 
Line 116 
 }  }
   
 static void  static void
 get_msg(struct sftp_conn *conn, struct sshbuf *m)  get_msg_extended(struct sftp_conn *conn, struct sshbuf *m, int initial)
 {  {
         u_int msg_len;          u_int msg_len;
         u_char *p;          u_char *p;
Line 134 
Line 134 
   
         if ((r = sshbuf_get_u32(m, &msg_len)) != 0)          if ((r = sshbuf_get_u32(m, &msg_len)) != 0)
                 fatal("%s: buffer error: %s", __func__, ssh_err(r));                  fatal("%s: buffer error: %s", __func__, ssh_err(r));
         if (msg_len > SFTP_MAX_MSG_LENGTH)          if (msg_len > SFTP_MAX_MSG_LENGTH) {
                 fatal("Received message too long %u", msg_len);                  do_log2(initial ? SYSLOG_LEVEL_ERROR : SYSLOG_LEVEL_FATAL,
                       "Received message too long %u", msg_len);
                   fatal("Ensure the remote shell produces no output "
                       "for non-interactive sessions.");
           }
   
         if ((r = sshbuf_reserve(m, msg_len, &p)) != 0)          if ((r = sshbuf_reserve(m, msg_len, &p)) != 0)
                 fatal("%s: buffer error: %s", __func__, ssh_err(r));                  fatal("%s: buffer error: %s", __func__, ssh_err(r));
Line 150 
Line 154 
 }  }
   
 static void  static void
   get_msg(struct sftp_conn *conn, struct sshbuf *m)
   {
           get_msg_extended(conn, m, 0);
   }
   
   static void
 send_string_request(struct sftp_conn *conn, u_int id, u_int code, const char *s,  send_string_request(struct sftp_conn *conn, u_int id, u_int code, const char *s,
     u_int len)      u_int len)
 {  {
Line 392 
Line 402 
   
         sshbuf_reset(msg);          sshbuf_reset(msg);
   
         get_msg(ret, msg);          get_msg_extended(ret, msg, 1);
   
         /* Expecting a VERSION reply */          /* Expecting a VERSION reply */
         if ((r = sshbuf_get_u8(msg, &type)) != 0)          if ((r = sshbuf_get_u8(msg, &type)) != 0)

Legend:
Removed from v.1.127  
changed lines
  Added in v.1.128