From e71a426f0c41f21df60f0bc3047eafac203b14ce Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 4 Oct 2019 09:22:08 +0200 Subject: [PATCH] Fix bad PixelBuffer reference in VNCServerST::setPixelBuffer() We need to examine the incoming PixelBuffer, not the previous one (which might not even be valid). --- common/rfb/VNCServerST.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index a3655bca..a24bb223 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -313,7 +313,7 @@ void VNCServerST::setPixelBuffer(PixelBuffer* pb_) // Make sure that we have at least one screen if (layout.num_screens() == 0) - layout.add_screen(Screen(0, 0, 0, pb->width(), pb->height(), 0)); + layout.add_screen(Screen(0, 0, 0, pb_->width(), pb_->height(), 0)); setPixelBuffer(pb_, layout); } -- 2.39.5