Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
tigervnc.5211
0004-Add-write-protection-to-OffsetPixelBuffer....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-Add-write-protection-to-OffsetPixelBuffer.patch of Package tigervnc.5211
From 9f615301aba1cc54a749950bf9462c5a85217bc4 Mon Sep 17 00:00:00 2001 From: Pierre Ossman <ossman@cendio.se> Date: Tue, 10 Sep 2019 15:25:30 +0200 Subject: [PATCH] Add write protection to OffsetPixelBuffer No one should every try to write to this buffer. Enforce that by throwing an exception if any one tries to get a writeable pointer to the data. --- common/rfb/EncodeManager.cxx | 6 ++++++ common/rfb/EncodeManager.h | 3 +++ 2 files changed, 9 insertions(+) Index: tigervnc-1.4.3/common/rfb/EncodeManager.cxx =================================================================== --- tigervnc-1.4.3.orig/common/rfb/EncodeManager.cxx +++ tigervnc-1.4.3/common/rfb/EncodeManager.cxx @@ -23,6 +23,7 @@ #include <rfb/SConnection.h> #include <rfb/SMsgWriter.h> #include <rfb/UpdateTracker.h> +#include <rfb/Exception.h> #include <rfb/RawEncoder.h> #include <rfb/RREEncoder.h> @@ -715,6 +716,11 @@ void EncodeManager::OffsetPixelBuffer::u stride = stride_; } +rdr::U8* EncodeManager::OffsetPixelBuffer::getBufferRW(const Rect& r, int* stride) +{ + throw rfb::Exception("Invalid write attempt to OffsetPixelBuffer"); +} + // Preprocessor generated, optimised methods #define BPP 8 Index: tigervnc-1.4.3/common/rfb/EncodeManager.h =================================================================== --- tigervnc-1.4.3.orig/common/rfb/EncodeManager.h +++ tigervnc-1.4.3/common/rfb/EncodeManager.h @@ -105,6 +105,9 @@ namespace rfb { void update(const PixelFormat& pf, int width, int height, const rdr::U8* data_, int stride); + + private: + virtual rdr::U8* getBufferRW(const Rect& r, int* stride); }; OffsetPixelBuffer offsetPixelBuffer;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor