| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | | |
Don't touch the existing value or we might mess it up when we avoid
division by zero.
|
| | |
| | |
| | |
| | |
| | | |
The buffer is considered changed right away, so we might not get any
add_changed() calls to trigger a start of the timer.
|
| | |
| | |
| | |
| | | |
It was only used by WinVNC, so push it there instead.
|
| | | |
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't force users of these headers to squash compiler
warnings about unused arguments, annotate with __unused_attr.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes:
/home/shade/dev/tigervnc/common/rfb/util.cxx:55:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
if (len < 0) {
~~~ ^ ~
1 error generated.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Clang complains loudly about this with Wformat=2, so add
a __printf_attr to help out.
Fixes:
/home/shade/dev/tigervnc/common/rfb/Logger.cxx:48:35: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vsnprintf(buf1, sizeof(buf1)-1, format, ap);
^~~~~~
1 error generated.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
InputHandler declares the second parameter of clientCutText
as an int.
Fixes:
/home/shade/dev/tigervnc/common/rfb/CMsgWriter.h:60:18: error: 'rfb::CMsgWriter::clientCutText' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
virtual void clientCutText(const char* str, rdr::U32 len);
^
/home/shade/dev/tigervnc/common/rfb/InputHandler.h:36:18: note: hidden overloaded virtual function 'rfb::InputHandler::clientCutText' declared here: type mismatch at 2nd parameter ('int' vs 'rdr::U32' (aka 'unsigned int'))
virtual void clientCutText(const char* str, int len) {}
^
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Clang doesn't like when struct and class are used to refer
to the same thing interchangeably.
Fixes all instances of:
In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.cxx:29:
In file included from /home/shade/dev/tigervnc/common/rfb/CConnection.h:28:
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: error: class 'Exception' was previously declared as a struct [-Werror,-Wmismatched-tags]
class Exception;
^
/home/shade/dev/tigervnc/common/rdr/Exception.h:32:10: note: previous use is here
struct Exception {
^
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:35:3: note: did you mean struct here?
class Exception;
^~~~~
struct
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: error: class 'Rect' was previously declared as a struct [-Werror,-Wmismatched-tags]
class Rect;
^
/home/shade/dev/tigervnc/common/rfb/Rect.h:68:10: note: previous use is here
struct Rect {
^
/home/shade/dev/tigervnc/common/rfb/DecodeManager.h:43:3: note: did you mean struct here?
class Rect;
^~~~~
struct
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
fread() returns size_t, which is unsigned. Don't check
for negative values to avoid warnings from Clang.
/home/shade/dev/tigervnc/common/rdr/FileInStream.cxx:74:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
if (n < 0 || ferror(file))
~ ^ ~
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix warnings emitted by Clang:
/home/shade/dev/tigervnc/common/rdr/FdInStream.h:30:9: error: 'rdr::FdInStreamBlockCallback' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class FdInStreamBlockCallback {
^
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.cxx:44:
In file included from /home/shade/dev/tigervnc/common/network/TcpSocket.h:31:
/home/shade/dev/tigervnc/common/network/Socket.h:82:9: error: 'network::ConnectionFilter' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class ConnectionFilter {
^
..etc
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix the following warnings emitted by Clang:
/home/shade/dev/tigervnc/common/rfb/Configuration.h:164:18: note: hidden overloaded virtual function 'rfb::VoidParameter::setParam' declared here: different number of parameters (0 vs 1)
virtual bool setParam();
^
/home/shade/dev/tigervnc/common/rfb/Configuration.h:256:18: error: 'rfb::BinaryParameter::setParam' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
virtual void setParam(const void* v, int l);
^
/home/shade/dev/tigervnc/common/rfb/Configuration.h:164:18: note: hidden overloaded virtual function 'rfb::VoidParameter::setParam' declared here: different number of parameters (0 vs 2)
virtual bool setParam();
|
| | | | |
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The sub-modules generally provide a better description than just the
short security method name.
|
| | | | | |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Indicate to the user how secure the transport channel is so they
can avoid entering their password for untrusted sites.
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes it easier to provide more sane events to the backend code
even with crazy clients.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
As a result we weren't overloading properly.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This adds the basic infrastructure and handshake for the QEMU
Extended Key Events extension. No viewer or server makes use of
the extra functionality yet though.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Based on QEMU's behaviour.
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Otherwise the client can end up with two visible cursors.
|
|/ / /
| | |
| | |
| | |
| | | |
In case the server is a front-end to multiple systems and needs to
know which system we're after.
|
| | | |
|
|/ /
| |
| |
| |
| | |
Some servers respect the ordering of pseudo-encodings as well, so
make sure we list the best one first.
|
|/
|
|
|
|
|
|
|
| |
Width and height of a cursor are received as U16 from network. Accepting full range of U16 values can cause integer overflows in multiple places.
The worst is probably VLA in CMsgReader::readSetXCursor:
rdr::U8 buf[width*height*4];
The width*height*4 can be too big to fit on stack or it can overflow into negative numbers. Both cases are undefined behaviour. Following writes to buf can overwrite other data on stack.
|
|\
| |
| |
| | |
https://github.com/michalsrb/tigervnc
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting the limit to 1024 which should be still more than enough.
Unlimited ulen and plen can cause various security problems:
* Overflow in `is->checkNoWait(ulen + plen)` causing it to contine when there is not enough data and then wait forever.
* Overflow in `new char[plen + 1]` that would allocate zero sized array which succeeds but returns pointer that should not be written into.
* Allocation failure in `new char[plen + 1]` from trying to allocate too much and crashing the whole server.
All those issues can be triggered by a client before authentication.
|
| |
| |
| |
| |
| |
| |
| | |
Currently it proceeds only if there aren't enough data in queue and then it blocks waiting.
Also the required amount to receive from network is (ulen + plen), not (ulen + plen + 2).
This allowed not authenticated clients to deny service to everyone.
|
|/
|
|
| |
Otherwise it gets leaked which would allow even not authenticated clients to exhaust server memory.
|
|\ \
| | |
| | |
| | | |
https://github.com/michalsrb/tigervnc
|
| |/
|/|
| |
| | |
If client sent fence with some data, followed by fence with no data (length 0), the original fence data were freed, but the pointer kept pointing at them. Sending one more fence would attempt to free them again.
|
| |
| |
| |
| |
| |
| | |
They are created in SConnection's and CConnection's constructors but never destroyed.
There is no reason for the indirection, so lets make them direct members.
|
|/
|
|
|
|
| |
The length sent by client is U32, but is converted into int. If it was bigger than 0x7fffffff the resulting int is negative, it passes the check against maxCutText and later throws std::bad_alloc from CharArray which takes down the whole server.
All the Streaming API deals with lengths in ints, so we can't tell it to skip that big amount of data. And it is not realistic to expect more than 2GB of clipboard data anyway. So lets just throw rdr::Exception that will disconnect this client and keep the server alive.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This redesigns the old "deferred updates" mechanism in to a frame
clock that governs how often updates are sent out. The goal is still
the same, to aggregate updates and avoid pointless updates, all in
the name of efficiency. This model should however be more robust
against delays that sometimes causes us to miss the desired rate.
|
| |
| |
| |
| |
| | |
This is not the code path commonly used in performance sensitive
scenarios, so favour correctness over performance.
|
| | |
|
| |
| |
| |
| | |
Make it a bit more readable.
|
| |
| |
| |
| | |
Make the control flow a bit clearer.
|
| |
| |
| |
| |
| | |
Make sure the code deals more gracefully with timers that take a
long time to execute, and therefore might miss their deadlines.
|
| |
| |
| |
| |
| |
| | |
Adds an optional graph to the viewer to display current frame rate,
pixel rate and network bandwidth. Makes it easier to debug and test
performance related issues.
|
| |
| |
| |
| |
| | |
Even if there are no pixels it will still trigger sanity checks
when we start throwing bogus coordinates around.
|
| |
| |
| |
| | |
It adds a lot of noise to the debug output with little gain.
|
| | |
|