Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Please give pre-approval unblock package xrdp

It fixes the important bug #855387, which prevents xrdp from working
with high but common display resolutions.

diff -Nru xrdp-0.9.1/debian/changelog xrdp-0.9.1/debian/changelog
- --- xrdp-0.9.1/debian/changelog 2017-02-13 21:09:43.000000000 +0100
+++ xrdp-0.9.1/debian/changelog 2017-02-17 13:21:12.000000000 +0100
@@ -1,3 +1,9 @@
+xrdp (0.9.1-7) UNRELEASED; urgency=medium
+
+  * Fix RFX with large tile sets, e.g. full HD displays. (Closes: #855387)
+
+ -- Dominik George <n...@naturalnet.de>  Fri, 17 Feb 2017 13:21:12 +0100
+
 xrdp (0.9.1-6) unstable; urgency=medium
 
   * Fix japanese keyboard detection. (Closes: #854847)
diff -Nru xrdp-0.9.1/debian/patches/highres.diff 
xrdp-0.9.1/debian/patches/highres.diff
- --- xrdp-0.9.1/debian/patches/highres.diff      1970-01-01 01:00:00.000000000 
+0100
+++ xrdp-0.9.1/debian/patches/highres.diff      2017-02-17 13:21:12.000000000 
+0100
@@ -0,0 +1,51 @@
+From: Dominik George <n...@naturalnet.de>
+Forwarded: https://github.com/neutrinolabs/xrdp/pull/664
+Acked-by: Thorsten Glaser <t...@mirbsd.de>
+Subject: RFX fixes for large tile sets.
+ This patch disables the limitation of rects to use and then
+ dynamically calculates the size of the message from the
+ rects that are really used.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855387
+Bug: https://github.com/neutrinolabs/xrdp/issues/524
+--- a/xrdp/xrdp_encoder.c
++++ b/xrdp/xrdp_encoder.c
+@@ -22,6 +22,7 @@
+ #include "xrdp.h"
+ #include "thread_calls.h"
+ #include "fifo.h"
++#include "limits.h"
+ 
+ #ifdef XRDP_RFXCODEC
+ #include "rfxcodec_encode.h"
+@@ -320,21 +321,25 @@ process_enc_rfx(struct xrdp_encoder *sel
+     mutex = self->mutex;
+     event_processed = self->xrdp_encoder_event_processed;
+ 
+-    if ((enc->num_crects > 512) || (enc->num_drects > 512))
+-    {
++    out_data_bytes = 16 * 1024 * 1024;
++
++    if ((enc->num_crects > (INT_MAX / sizeof(struct rfx_tile))) ||
++        (enc->num_drects > (INT_MAX / sizeof(struct rfx_rect) -
++                            sizeof(struct rfx_tile) * enc->num_crects -
++                            256 - out_data_bytes)) ||
++        (enc->num_crects < 0) || (enc->num_drects < 0)) {
+         return 0;
+     }
+ 
+-    out_data_bytes = 16 * 1024 * 1024;
+-    index = 256 + sizeof(struct rfx_tile) * 512 +
+-                  sizeof(struct rfx_rect) * 512;
++    index = 256 + sizeof(struct rfx_tile) * enc->num_crects +
++                  sizeof(struct rfx_rect) * enc->num_drects;
+     out_data = (char *) g_malloc(out_data_bytes + index, 0);
+     if (out_data == 0)
+     {
+         return 0;
+     }
+     tiles = (struct rfx_tile *) (out_data + out_data_bytes + 256);
+-    rfxrects = (struct rfx_rect *) (tiles + 512);
++    rfxrects = (struct rfx_rect *) (tiles + enc->num_crects);
+ 
+     count = enc->num_crects;
+     for (index = 0; index < count; index++)
diff -Nru xrdp-0.9.1/debian/patches/series xrdp-0.9.1/debian/patches/series
- --- xrdp-0.9.1/debian/patches/series    2017-02-13 21:06:43.000000000 +0100
+++ xrdp-0.9.1/debian/patches/series    2017-02-17 13:08:38.000000000 +0100
@@ -8,3 +8,4 @@
 systemd.diff
 lfs.diff
 kb_jp.diff
+highres.diff


unblock xrdp/0.9.1-7

- -- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

-----BEGIN PGP SIGNATURE-----

iQJ4BAEBCABiFiEEPJ1UpHV1wCb7F/0mt5o8FqDE8pYFAlim9ScxGmh0dHBzOi8v
d3d3LmRvbWluaWstZ2VvcmdlLmRlL2dwZy1wb2xpY3kudHh0LmFzYxIcbmlrQG5h
dHVyYWxuZXQuZGUACgkQt5o8FqDE8pazPA//bO8g/hTWYhtsdEKHqxduVFZI43sG
5S54PuxK0IlpKo4abBh4GAN1hrhSA146oPRxHZwAfAYwtoHFSoPZ4eFN8+Dg79qK
sd0058aJb/9K5NrtToFKiZkwcRV1Bnn6ZWGVw6kghRC8p8Ji0U2b29ACv44sV+lj
1rdMm8Y5GcVegtZX1RWxrOEaJ6OEMHbyUX8U1C6RRqQYIaDvk1rQBidV1Ho+CZOe
HArOzvtdZDPcnlA0QtiWszB/hT78EMDeWWMbZXnRJ0GxoHatD9ykFTEe2xn19Net
7PZ7GeD2JsqcKXTQad1j9MVmCiORnI7UfDzsB/L0xrfbGa5I8utANqravY4coDUo
YhGE+GRstvA74BE9bin/A4SV0ijDrCzpVJQYQOyCEUTgTl8ZP87Eu065oCz+iT/N
NQnEFWQSu7ij1aPvksm1xCmdOsjLNGpulmQM9ofTQrFDWv/yEZ5OtqxP0tFBy7KE
wEr1QxE89ryh4eW/Xz7+VStWwjCajinc11LmgCseK7BHXJGrBXth/g+s8colafaY
8KNJ2bA3nR/HWvoekiSLecBZurF4wvnFoCG+nuJd2Ek/xavrwNuMMXnf7W5G6RNq
tpGUHF3zHvGje2Ezeeq6pt18QlsBlPnAjzr7sQHvj17IYJg93Yma1wrzP8yMX27e
GXFbMrXMU4Bn0rA=
=gTFo
-----END PGP SIGNATURE-----

Reply via email to