| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|
|
|
|
| |
These will always be byte streams at heart, so let's try to keep them
with a proper type. Should make it clearer how they will be used.
|
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
| |
There is no point flushing when corking was enabled, as we might then
push out a small buffer that the corking otherwise would have preserved.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Provide some safety checks when directly accessing the underlying
pointer of streams.
|
|
|
|
|
| |
The principle can be used in a more general fashion than just TCP
streams.
|
|
|
|
|
| |
Just have a simply number of bytes argument to avoid a lot of
complexity.
|
|
|
|
|
| |
Makes it more readable to write code that needs to know how much
data/space is available in a stream.
|
|
|
|
|
| |
It might leak data depending on what's in the buffer. Use pad() instead
where blank space is needed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Keep the generic stream classes clean and general.
|
|
More changes will follow.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519
|