Pierre Ossman
c0dac220de
Remove readString()/writeString()
These are not universal in the protocol so having functions for them
only obfuscates things.
4 years ago
Pierre Ossman
b00d2fe17e
Make direct stream API a bit safer
Provide some safety checks when directly accessing the underlying
pointer of streams.
4 years ago
Pierre Ossman
186819080b
Simplify stream availability handling
Just have a simply number of bytes argument to avoid a lot of
complexity.
4 years ago
Pierre Ossman
b35ae29f93
Add stream avail() methods
Makes it more readable to write code that needs to know how much
data/space is available in a stream.
4 years ago
Pierre Ossman
75e6e0653a
Be defensive about overflows in stream objects
We use a lot of lengths given to us over the network, so be more
paranoid about them causing an overflow as otherwise an attacker
might trick us in to overwriting other memory.
This primarily affects the client which often gets lengths from the
server, but there are also some scenarios where the server might
theoretically be vulnerable.
Issue found by Pavel Cheremushkin from Kaspersky Lab.
4 years ago
Pierre Ossman
0943c006c7
Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects.
4 years ago
Pierre Ossman
fbad8a9adb
Remove unneeded virtual qualifiers on stream methods
8 years ago
Pierre Ossman
7b5c069d2e
Push encoding specific formats into the encoders and decoders
Keep the generic stream classes clean and general.
10 years ago
Constantin Kaplinsky
a2adc8d4cf
Migrating to new directory structure adopted from the RealVNC's source tree. More changes will follow.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519
18 years ago
Constantin Kaplinsky
b0f89f834a
Merged the rdr library with VNC 4.1.1.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@333 3789f03b-4d11-0410-bbf8-ca57d06f2519
18 years ago
Peter Åstrand
604bf252f3
Added readCompactLength and writeCompactLength
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@12 3789f03b-4d11-0410-bbf8-ca57d06f2519
19 years ago
Constantin Kaplinsky
47ed8d321c
Initial revision
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2 3789f03b-4d11-0410-bbf8-ca57d06f2519
19 years ago