1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

messages: Fix two ssh_buffer_unpack().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
This commit is contained in:
Andreas Schneider
2014-08-07 16:22:24 +02:00
parent 6019cf1bed
commit 97c6b76863

View File

@@ -641,11 +641,11 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_request){
goto error; goto error;
} }
msg->type = SSH_REQUEST_AUTH; msg->type = SSH_REQUEST_AUTH;
rc = ssh_buffer_unpack(packet, "ss", rc = ssh_buffer_unpack(packet,
&msg->auth_request.username, "sss",
&service, &msg->auth_request.username,
&method &service,
); &method);
if (rc != SSH_OK) { if (rc != SSH_OK) {
goto error; goto error;
@@ -1002,11 +1002,12 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
} }
if (strcmp(type_c,"direct-tcpip") == 0) { if (strcmp(type_c,"direct-tcpip") == 0) {
rc = ssh_buffer_unpack(packet, "sds", rc = ssh_buffer_unpack(packet,
&msg->channel_request_open.destination, "sdsd",
&destination_port, &msg->channel_request_open.destination,
&msg->channel_request_open.originator, &destination_port,
&originator_port); &msg->channel_request_open.originator,
&originator_port);
if (rc != SSH_OK) { if (rc != SSH_OK) {
goto error; goto error;
} }