diff options
author | 2019-08-26 21:27:44 +0200 | |
---|---|---|
committer | 2019-08-26 21:28:02 +0200 | |
commit | d542c2249df5d4c2a05ec486b4365591220f7b2d (patch) | |
tree | 5103deb82ca9be87720fe1898a5e2651dd61eea6 /net-misc/rdesktop/files | |
parent | net-analyzer/ettercap: stable 0.8.3 for sparc, bug #618018 (diff) | |
download | gentoo-d542c2249df5d4c2a05ec486b4365591220f7b2d.tar.gz gentoo-d542c2249df5d4c2a05ec486b4365591220f7b2d.tar.bz2 gentoo-d542c2249df5d4c2a05ec486b4365591220f7b2d.zip |
net-misc/rdesktop: backport fix for some failing connections
1.8.6 fails with some servers (like W2003)
Closes: https://bugs.gentoo.org/692042
Package-Manager: Portage-2.3.73, Repoman-2.3.17
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'net-misc/rdesktop/files')
-rw-r--r-- | net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch b/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch new file mode 100644 index 000000000000..dbb0d0e9baf7 --- /dev/null +++ b/net-misc/rdesktop/files/rdesktop-1.8.6-sec_decrypt.patch @@ -0,0 +1,59 @@ +From 7841030279c5300d5073b2348b58f3f41e136f82 Mon Sep 17 00:00:00 2001 +From: Markus Beth <markus.beth@web.de> +Date: Tue, 11 Jun 2019 22:57:31 +0200 +Subject: [PATCH] sec_decrypt() the correct amount of data + +Save the correct amount of data to sec_decrypt() because after +inout_uint8p() the macro s_remaining(s) will find nothing left. +--- + secure.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/secure.c b/secure.c +index 8f65b3aa..9b301e1f 100644 +--- a/secure.c ++++ b/secure.c +@@ -813,6 +813,7 @@ sec_recv(uint8 * rdpver) + STREAM s; + struct stream packet; + size_t data_offset; ++ size_t remaining; + unsigned char *data; + + while ((s = mcs_recv(&channel, rdpver)) != NULL) +@@ -832,8 +833,9 @@ sec_recv(uint8 * rdpver) + + data_offset = s_tell(s); + +- inout_uint8p(s, data, s_remaining(s)); +- sec_decrypt(data, s_remaining(s)); ++ remaining = s_remaining(s); ++ inout_uint8p(s, data, remaining); ++ sec_decrypt(data, remaining); + + s_seek(s, data_offset); + } +@@ -860,8 +862,9 @@ sec_recv(uint8 * rdpver) + + data_offset = s_tell(s); + +- inout_uint8p(s, data, s_remaining(s)); +- sec_decrypt(data, s_remaining(s)); ++ remaining = s_remaining(s); ++ inout_uint8p(s, data, remaining); ++ sec_decrypt(data, remaining); + } + + if (sec_flags & SEC_LICENCE_NEG) +@@ -883,8 +886,9 @@ sec_recv(uint8 * rdpver) + + data_offset = s_tell(s); + +- inout_uint8p(s, data, s_remaining(s)); +- sec_decrypt(data, s_remaining(s)); ++ remaining = s_remaining(s); ++ inout_uint8p(s, data, remaining); ++ sec_decrypt(data, remaining); + + /* Check for a redirect packet, starts with 00 04 */ + if (data[0] == 0 && data[1] == 4) |