Commit Graph

5 Commits (12066abc660de932924b5635913170b3c4ac5f87)

Author SHA1 Message Date
Pierre Ossman 25995e2490 Remove unused bufSize argument from streams 4 years ago
Pierre Ossman 92c7695981 Create common base classes for buffered streams
Most streams are backed by a memory buffer. Create common base classes
for this functionality to avoid code duplication.
4 years ago
Pierre Ossman 259f1055cb 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.
5 years ago
Pierre Ossman 3282836baf Make ZlibInStream more robust against failures
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
5 years ago
matt 408c005d3e Initial commit 5 years ago