| 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.
|
|
|
|
|
|
| |
Avoid duplicating all the memory mangement, and instead use the
BufferedOutStream as a base clase for all out streams that need an
intermediate buffer.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These streams both need to change the corking state temporarily, but it
is important it is restored to the previous state or things might get
messed up.
For the zlib stream it would just leave things uncorked, which still
works but is less efficient.
But for the TLS stream it might make things very unresponsive as the
corking might be left on permanently, delaying packets indefinitely.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
There are multiple "okay" return values, not just Z_OK. Make sure we
don't bail out needlessly.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It's either not used, or no longer relevant.
|
|
|
|
|
|
|
| |
not detecting the correct approach properly, and hence still getting crashes.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4731 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
| |
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4623 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
| |
compress buffer allocated by the Tight encoder was not large enough, and (2) Zlib 1.2.5 can sometimes call deflate(..., Z_BLOCK) within the body of deflateParams(), so we need to check avail_in after calling checkCompressionLevel() to ensure that there is still data left to compress before we call deflate() again.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4617 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
| |
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4508 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
|
|
| |
number of arguments.
[Bugfix] Minor compilation fixes (missing #includes)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3168 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
|