From d01e1bb4246323ba6fcee3b82ef1faa9b1dac82a Mon Sep 17 00:00:00 2001
From: Christian Beier <dontmind@freeshell.org>
Date: Mon, 19 Aug 2019 22:32:25 +0200
Subject: [PATCH] rfbserver: don't leak stack memory to the remote

Thanks go to Pavel Cheremushkin of Kaspersky for reporting.

[sunweaver] Ported to rfbserver.c in tightvnc

--- a/Xvnc/programs/Xserver/hw/vnc/rfbserver.c
+++ b/Xvnc/programs/Xserver/hw/vnc/rfbserver.c
@@ -1481,6 +1481,8 @@
     rfbClientPtr cl, nextCl;
     rfbServerCutTextMsg sct;
 
+    memset((char *)&sct, 0, sizeof(sct));
+
     if (rfbViewOnly)
 	return;
 
