From 97c6b76863676d93d4e65534e5aa387d5644c230 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 7 Aug 2014 16:22:24 +0200 Subject: messages: Fix two ssh_buffer_unpack(). Signed-off-by: Andreas Schneider Reviewed-by: Aris Adamantiadis --- src/messages.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/messages.c b/src/messages.c index c2bf0d39..4216cb51 100644 --- a/src/messages.c +++ b/src/messages.c @@ -641,11 +641,11 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){ goto error; } msg->type = SSH_REQUEST_AUTH; - rc = ssh_buffer_unpack(packet, "ss", - &msg->auth_request.username, - &service, - &method - ); + rc = ssh_buffer_unpack(packet, + "sss", + &msg->auth_request.username, + &service, + &method); if (rc != SSH_OK) { goto error; @@ -1002,11 +1002,12 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){ } if (strcmp(type_c,"direct-tcpip") == 0) { - rc = ssh_buffer_unpack(packet, "sds", - &msg->channel_request_open.destination, - &destination_port, - &msg->channel_request_open.originator, - &originator_port); + rc = ssh_buffer_unpack(packet, + "sdsd", + &msg->channel_request_open.destination, + &destination_port, + &msg->channel_request_open.originator, + &originator_port); if (rc != SSH_OK) { goto error; } -- cgit