Restrict client resolution 54/278554/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 22 Jul 2022 02:57:31 +0000 (11:57 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 22 Jul 2022 02:57:36 +0000 (11:57 +0900)
if client request resolution is bigger than server,
set to server resolution to client.

Change-Id: I1a63093c6d7997b8c897b9d87d4181fa8f7d04a0
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/e_mod_rdp.c

index e05f0dd2bf9bfaffa400af7dcdaf2fff0a3c3f64..9b64f36760ed08a2533cf4f0cf46d038c5dcb593 100644 (file)
@@ -1762,7 +1762,8 @@ e_rdp_peer_activate(freerdp_peer *client)
 
    if (output->w != settings->DesktopWidth || output->h != settings->DesktopHeight)
      {
-        if (b->no_clients_resize || b->client_count > 0)
+        if (b->no_clients_resize || b->client_count > 0 ||
+            (settings->DesktopWidth > output->primary_w || settings->DesktopHeight > output->primary_h))
           {
              /* RDP peers don't dictate their resolution to e */
              if (!settings->DesktopResize)