| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The flags should always be empty anyway.
|
|
|
|
|
|
|
|
|
| |
Avoid having to buffer everything we want to discard, and instead do it
piece by piece. This is more efficient, and avoids hitting any limits on
the buffering.
Note that this is safe here because we already know we have all the
compressed data. It would not be safe for a general input stream.
|
|
|
|
|
|
| |
This is a regression from ad0f061. If a VMware cursor rect was split up
over multiple read()s then the stream would become corrupted as we set
the restore point at the wrong place.
|
|
|
|
|
|
| |
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
|
|
|
|
|
|
|
|
| |
This change makes it possible for re-synchronizing the remote cursor on
the vncviewer when in fullscreen mode. This is done by locally moving
the cursor position to what the server thinks it should be.
Now SDL games should work!
|
|
|
|
|
|
|
|
| |
Some of these were incorrectly calculated so the server or client would
wait too long before proceeding with decoding.
Change all of these to be a more explicit calculation to avoid such
issues in the future.
|
|
|
|
|
|
|
|
|
|
| |
Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
|
|
|
|
|
| |
These are not universal in the protocol so having functions for them
only obfuscates things.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the checks around to avoid missing cases where we might access
memory that is no longer valid. Also avoid touching the underlying
stream implicitly (e.g. via the destructor) as it might also no
longer be valid.
A malicious server could theoretically use this for remote code
execution in the client.
Issue found by Pavel Cheremushkin from Kaspersky Lab
|
|
|
|
|
|
|
| |
Implements support in both client and server for the extended
clipboard format first seen in UltraVNC. Currently only implements
text handling, but that is still an improvement as it extends the
clipboard from ISO 8859-1 to full Unicode.
|
|
|
|
|
|
| |
We now filter incoming data, which means we can start assuming the
clipboard data is always null terminated. This allows us to clean
up a lot of the internal handling.
|
|
|
|
|
|
| |
This is required by the protocol so we should make sure it is
enforced. We are tolerant of clients that violate this though and
convert incoming clipboard data.
|
| |
|
|\ |
|
| | |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Avoid using the callbacks used for runtime changes for the initial
setup. They weren't really useful anyway as you could not allocate
a framebuffer without also knowing the pixel format. So make things
more clear by letting serverInit() get the initial settings.
|
| |
| |
| |
| |
| |
| | |
We need to track different things in the server and client, so
separate things to two independent structures to keep things more
clear.
|
| |
| |
| |
| |
| |
| |
| | |
Avoid direct access to the screen dimensions and layout so that we
can make sure it stays sane. This also makes sure the layout is
properly updated when we only get the screen dimensions from the
server.
|
|/
|
|
|
| |
These are not allowed in C++, and have been made optional in C11.
So let's just get rid of them and any issues they may cause.
|
|
|
|
|
| |
The compiler isn't smart enough to figure all of these out, so
restructure things a bit to avoid warnings.
|
| |
|
|
|
|
|
| |
Don't touch the existing value or we might mess it up when we avoid
division by zero.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
This will allow us to use better formats that preserve the entire
alpha channel.
|
| |
|
|
|
|
|
|
| |
The connection object is a much more appropriate object for the
decoders and encoders to keep track of. Besides the streams, it also
contains state like connection parameters.
|
|
|
|
|
| |
This keeps the reader and writer objects clean and simple protocol
decoders/encoders.
|
|
|
|
| |
Avoids having to special case things. Keeps the code simpler.
|
|
|
|
| |
We have no need for this abstraction so let's keep things simple.
|
|
|
|
|
|
|
| |
garbage at us.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4942 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
|
|
|
|
|
| |
encoding in the RFB protocol has always been signed, and signed values
are also used in the specification (ie DesktopName = -307 etc). In the
code, however, unsigned types were used in a number of places, but not
all, which causes warnings. This patch fixes the problem by switching
to signed values everywhere.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3968 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
| |
of old and new features.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3696 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
| |
This avoids big buffer overflow when memcpy is called with "-1" argument.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3607 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
|
|
|
| |
updating the desktop name on the fly.
Tested in ThinLinc since 2008-01-07.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3549 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
| |
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3183 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
More changes will follow.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519
|