diff -Nru rdesktop-1.8.6/debian/changelog rdesktop-1.8.6/debian/changelog --- rdesktop-1.8.6/debian/changelog 2019-06-10 07:16:21.000000000 +0000 +++ rdesktop-1.8.6/debian/changelog 2019-06-14 15:32:25.000000000 +0000 @@ -1,3 +1,10 @@ +rdesktop (1.8.6-2) unstable; urgency=medium + + * Backport fixed version number and typo. + * Backport sec_decrypt() the correct amount of data (closes: #930511). + + -- Laszlo Boszormenyi (GCS) Fri, 14 Jun 2019 15:32:25 +0000 + rdesktop (1.8.6-1) unstable; urgency=high * New upstream release, including many security fixes. diff -Nru rdesktop-1.8.6/debian/patches/90-fixed_version_number_and_typo.patch rdesktop-1.8.6/debian/patches/90-fixed_version_number_and_typo.patch --- rdesktop-1.8.6/debian/patches/90-fixed_version_number_and_typo.patch 1970-01-01 00:00:00.000000000 +0000 +++ rdesktop-1.8.6/debian/patches/90-fixed_version_number_and_typo.patch 2019-06-14 15:32:01.000000000 +0000 @@ -0,0 +1,28 @@ +From 231502e1cf934bac130432f42bf44efcac34f517 Mon Sep 17 00:00:00 2001 +From: Markus Beth +Date: Wed, 22 May 2019 19:51:40 +0200 +Subject: [PATCH] fixed version number and typo + +--- + doc/ChangeLog | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/ChangeLog b/doc/ChangeLog +index 3a054d18..62eb5ef6 100644 +--- a/doc/ChangeLog ++++ b/doc/ChangeLog +@@ -1,4 +1,4 @@ +-rdesktop (1.8.5) ++rdesktop (1.8.6) + * Fix protocol code handling new licenses + + -- Pierre Ossman 2019-05-16 +@@ -81,7 +81,7 @@ rdesktop (1.8.1) + * Fix issue with reconnect, make use of deactivate variable + * Added 4 new disconnect reasons with exit codes + * Fix issues of window handling in SeamlessRDP parts of rdesktop +- * Fix a backward compability with OpenSSL < 0.9.9 ++ * Fix a backward compatibility with OpenSSL < 0.9.9 + * Fix a bug when code needs a x window available but there are none. + * Fix a sigsegv zeroing memory + * Fix a 64bit portability issue diff -Nru rdesktop-1.8.6/debian/patches/91-sec_decrypt_the_correct_amount_of_data.patch rdesktop-1.8.6/debian/patches/91-sec_decrypt_the_correct_amount_of_data.patch --- rdesktop-1.8.6/debian/patches/91-sec_decrypt_the_correct_amount_of_data.patch 1970-01-01 00:00:00.000000000 +0000 +++ rdesktop-1.8.6/debian/patches/91-sec_decrypt_the_correct_amount_of_data.patch 2019-06-14 15:32:25.000000000 +0000 @@ -0,0 +1,59 @@ +From 7841030279c5300d5073b2348b58f3f41e136f82 Mon Sep 17 00:00:00 2001 +From: Markus Beth +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) diff -Nru rdesktop-1.8.6/debian/patches/series rdesktop-1.8.6/debian/patches/series --- rdesktop-1.8.6/debian/patches/series 2019-01-07 23:03:14.000000000 +0000 +++ rdesktop-1.8.6/debian/patches/series 2019-06-14 15:32:25.000000000 +0000 @@ -19,3 +19,5 @@ 01_paging.patch 20_update_manpage.dpatch 80_handle_nostrip_option.dpatch +90-fixed_version_number_and_typo.patch +91-sec_decrypt_the_correct_amount_of_data.patch