#259: [PATCH] _libssh2_packet_add sends uninitialized data
--------------------+--------------------
 Reporter:  ncm     |       Owner:
     Type:  defect  |      Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  misc    |     Version:  1.4.2
 Keywords:          |  Blocked By:
   Blocks:          |
--------------------+--------------------
 In {{{_libssh2_packet_add}}}, called by {{{_libssh2_packet_read}}},
 a call to {{{_libssh2_packet_send}}} that is supposed to
 send a one-byte message {{{SSH_MSG_REQUEST_FAILURE}}} will
 send an uninitialized byte upon re-entry if its call to _send
 returns _EAGAIN.  Suggesting
 {{{


                  if (want_reply) {
 +                  libssh2_packet_add_jump_point5:
                      unsigned char packet = SSH_MSG_REQUEST_FAILURE;
 -                  libssh2_packet_add_jump_point5:
                      session->packAdd_state = libssh2_NB_state_jump5;
                      rc = _libssh2_transport_send(session, &packet, 1,
 NULL, 0);

 }}}

-- 
Ticket URL: <https://trac.libssh2.org/ticket/259>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to