diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-02-23 13:12:54 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-02-23 13:12:54 +0100 |
commit | 28055e28973785d867595d81e40c175843186751 (patch) | |
tree | e36d154599eea2a7cd381c0d3370e7620edc438b /common | |
parent | e714412294e9955448be2ec98f8f10684476fa8f (diff) | |
download | tigervnc-28055e28973785d867595d81e40c175843186751.tar.gz tigervnc-28055e28973785d867595d81e40c175843186751.zip |
Don't try to render cursors with no size
Even if there are no pixels it will still trigger sanity checks
when we start throwing bogus coordinates around.
Diffstat (limited to 'common')
-rw-r--r-- | common/rfb/Cursor.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/rfb/Cursor.cxx b/common/rfb/Cursor.cxx index ffbe955c..99df82d6 100644 --- a/common/rfb/Cursor.cxx +++ b/common/rfb/Cursor.cxx @@ -283,6 +283,11 @@ void RenderedCursor::update(PixelBuffer* framebuffer, buffer.setPF(format); buffer.setSize(clippedRect.width(), clippedRect.height()); + // Bail out early to avoid pestering the framebuffer with + // bogus coordinates + if (clippedRect.area() == 0) + return; + data = framebuffer->getBuffer(buffer.getRect(offset), &stride); buffer.imageRect(buffer.getRect(), data, stride); |