aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Dunn <amdunn@gmail.com>2014-04-19 15:29:23 -0500
committerAndreas Schneider <asn@cryptomilk.org>2014-05-06 08:56:44 +0200
commitf37c844bf7c94af84dd4d6a32004e03a7edde89b (patch)
tree55c9cddf1c04704ed1fa2520c4f7e5368feb322c /src
parent2c7dfb02a8bedbd092bc38ea8988ef39cdcb73f4 (diff)
downloadlibssh-f37c844bf7c94af84dd4d6a32004e03a7edde89b.tar.gz
libssh-f37c844bf7c94af84dd4d6a32004e03a7edde89b.tar.xz
libssh-f37c844bf7c94af84dd4d6a32004e03a7edde89b.zip
messages: Add missing ntohl on X11 request screen number
BUG: https://red.libssh.org/issues/160 Signed-off-by: Alan Dunn <amdunn@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/messages.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/messages.c b/src/messages.c
index e7bf39f0..d0a35f4e 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -1469,6 +1469,7 @@ int ssh_message_handle_channel_request(ssh_session session, ssh_channel channel,
if (strcmp(request, "x11-req") == 0) {
ssh_string auth_protocol = NULL;
ssh_string auth_cookie = NULL;
+ uint32_t screen_number;
buffer_get_u8(packet, &msg->channel_request.x11_single_connection);
@@ -1496,7 +1497,8 @@ int ssh_message_handle_channel_request(ssh_session session, ssh_channel channel,
ssh_string_free(auth_protocol);
ssh_string_free(auth_cookie);
- buffer_get_u32(packet, &msg->channel_request.x11_screen_number);
+ buffer_get_u32(packet, &screen_number);
+ msg->channel_request.x11_screen_number = ntohl(screen_number);
goto end;
}