aboutsummaryrefslogtreecommitdiff
path: root/src/messages.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-08-07 16:22:24 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-08-07 17:28:42 +0200
commit97c6b76863676d93d4e65534e5aa387d5644c230 (patch)
tree6b3c5a649b14e6aebd2da823d793d62ec7e6b0b3 /src/messages.c
parent6019cf1bed63849e49174f9a51512a8b0fe84052 (diff)
downloadlibssh-97c6b76863676d93d4e65534e5aa387d5644c230.tar.gz
libssh-97c6b76863676d93d4e65534e5aa387d5644c230.tar.xz
libssh-97c6b76863676d93d4e65534e5aa387d5644c230.zip
messages: Fix two ssh_buffer_unpack().
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
Diffstat (limited to 'src/messages.c')
-rw-r--r--src/messages.c21
1 files changed, 11 insertions, 10 deletions
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;
}