Преглед на файлове

Reject too large screen resize requests

We'll just crash later if we try to use such a large screen, so reject
the request from the client instead and keep the server running.
tags/v1.10.90
Pierre Ossman преди 4 години
родител
ревизия
e97da59a76
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5
    0
      common/rfb/VNCServerST.cxx

+ 5
- 0
common/rfb/VNCServerST.cxx Целия файл

@@ -527,6 +527,11 @@ unsigned int VNCServerST::setDesktopSize(VNCSConnectionST* requester,
unsigned int result;
std::list<VNCSConnectionST*>::iterator ci, ci_next;

// We can't handle a framebuffer larger than this, so don't let a
// client set one (see PixelBuffer.cxx)
if ((fb_width > 16384) || (fb_height > 16384))
return resultProhibited;

// Don't bother the desktop with an invalid configuration
if (!layout.validate(fb_width, fb_height))
return resultInvalid;

Loading…
Отказ
Запис