mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Fix uninitalized memory use in deflate_stream
Reference in original zlib: https://github.com/madler/zlib/pull/393 Resolves: #1586 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ Version 254:
|
|||||||
|
|
||||||
* Fix data race in test::stream::connect
|
* Fix data race in test::stream::connect
|
||||||
* Fix UB in websocket close tests
|
* Fix UB in websocket close tests
|
||||||
|
* Fix uninitalized memory use in deflate_stream
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -623,6 +623,7 @@ init()
|
|||||||
|
|
||||||
window_ = reinterpret_cast<Byte*>(buf_.get());
|
window_ = reinterpret_cast<Byte*>(buf_.get());
|
||||||
prev_ = reinterpret_cast<std::uint16_t*>(buf_.get() + nwindow);
|
prev_ = reinterpret_cast<std::uint16_t*>(buf_.get() + nwindow);
|
||||||
|
std::memset(prev_, 0, nprev);
|
||||||
head_ = reinterpret_cast<std::uint16_t*>(buf_.get() + nwindow + nprev);
|
head_ = reinterpret_cast<std::uint16_t*>(buf_.get() + nwindow + nprev);
|
||||||
|
|
||||||
/* We overlay pending_buf_ and d_buf_ + l_buf_. This works
|
/* We overlay pending_buf_ and d_buf_ + l_buf_. This works
|
||||||
|
@@ -3,11 +3,6 @@
|
|||||||
Memcheck:Cond
|
Memcheck:Cond
|
||||||
fun:fill_window
|
fun:fill_window
|
||||||
}
|
}
|
||||||
{
|
|
||||||
beast_fill_window_no_init
|
|
||||||
Memcheck:Cond
|
|
||||||
fun:_ZN5beast4zlib6detail14deflate_stream11fill_windowIvEEvRNS0_8z_paramsE
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
Ignore OpenSSL malloc
|
Ignore OpenSSL malloc
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
|
Reference in New Issue
Block a user