#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 Resolution: | Keywords: Blocked By: | Blocks: ---------------------+-------------------
Comment (by ncm): Or, better, {{{ --- a/src/packet.c +++ b/src/packet.c @@ -583,8 +583,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char if (want_reply) { - unsigned char packet = SSH_MSG_REQUEST_FAILURE; libssh2_packet_add_jump_point5: + static const unsigned char packet = SSH_MSG_REQUEST_FAILURE; session->packAdd_state = libssh2_NB_state_jump5; rc = _libssh2_transport_send(session, &packet, 1, NULL, 0); if (rc == LIBSSH2_ERROR_EAGAIN) }}} -- Ticket URL: <https://trac.libssh2.org/ticket/259#comment:1> libssh2 <https://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel