From 189f503b987416a28ff58504dd416979bde46ed7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 14 Jan 2021 13:07:56 +0100 Subject: [PATCH] Fix handling of bad update requests We computed a safe area if a client gave us a bogus one, but we didn't actually use it. Fix this properly and make sure we don't pass on bad coordinates further. --- common/rfb/VNCSConnectionST.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 9e7f3de..114c922 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -874,7 +874,7 @@ void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental) // Just update the requested region. // Framebuffer update will be sent a bit later, see processMessages(). - Region reqRgn(r); + Region reqRgn(safeRect); if (!incremental || !continuousUpdates) requested.assign_union(reqRgn);