diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-12-20 07:39:06 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-12-20 07:39:06 +0100 |
commit | d461f7fdb8b01f655260ea2f495ece700f3c9898 (patch) | |
tree | 5113b5a2844de4ce1469864d56c9786b3c4d63b0 /common/rfb/EncodeManager.cxx | |
parent | c59f195d0ef2922bc163ac7cabfc94b9f1b25860 (diff) | |
parent | 05e28490873a861379c943bf616614b78b558b89 (diff) | |
download | tigervnc-d461f7fdb8b01f655260ea2f495ece700f3c9898.tar.gz tigervnc-d461f7fdb8b01f655260ea2f495ece700f3c9898.zip |
Merge branch 'secfix' of https://github.com/CendioOssman/tigervnc
Diffstat (limited to 'common/rfb/EncodeManager.cxx')
-rw-r--r-- | common/rfb/EncodeManager.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index 57020fee..a29502ae 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -28,6 +28,7 @@ #include <rfb/SMsgWriter.h> #include <rfb/UpdateTracker.h> #include <rfb/LogWriter.h> +#include <rfb/Exception.h> #include <rfb/RawEncoder.h> #include <rfb/RREEncoder.h> @@ -1051,11 +1052,13 @@ void EncodeManager::OffsetPixelBuffer::update(const PixelFormat& pf, int stride_) { format = pf; - width_ = width; - height_ = height; // Forced cast. We never write anything though, so it should be safe. - data = (rdr::U8*)data_; - stride = stride_; + setBuffer(width, height, (rdr::U8*)data_, stride_); +} + +rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& r, int* stride) +{ + throw rfb::Exception("Invalid write attempt to OffsetPixelBuffer"); } // Preprocessor generated, optimised methods |