File xrdp-disable-8-bpp-vnc-support.patch of Package xrdp

From: Fuminobu TAKEYAMA <ftake@geeko.jp>
Date: Mon, 01 May 2017 08:13:41 +0000
Subject: [PATCH] disable 8 bpp vnc support

Refresh the patch from Felix Zhang

Xvnc drops support for 8 bpp since 1.4.0. Trying to launch Xvnc in
8 bpp will cause it to dump core (bsc#991059).
---
 vnc/vnc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/vnc/vnc.c b/vnc/vnc.c
index b0eb29b3..db593da0 100644
--- a/vnc/vnc.c
+++ b/vnc/vnc.c
@@ -1011,15 +1011,19 @@ lib_mod_connect(struct vnc *v)
     /* check if bpp is supported for rdp connection */
     switch (v->server_bpp)
     {
-        case 8:
         case 15:
         case 16:
         case 24:
         case 32:
             break;
         default:
-            v->server_msg(v, "VNC error - only supporting 8, 15, 16, 24 and 32 "
+            v->server_msg(v, "VNC error - only supporting 15, 16, 24 and 32 "
                           "bpp rdp connections", 0);
+            if (v->server_bpp == 8)
+            {
+                v->server_msg(v, "VNC error - 8 bpp support is dropped "
+                              "since Xvnc 1.4.0", 0);
+            }
         return 1;
     }
openSUSE Build Service is sponsored by