mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 05:44:38 +02:00
Fixed null pointer ASAN error introduced in commit d41b7c23
Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Version 272:
|
Version 272:
|
||||||
|
|
||||||
* Add BEAST_THROWS
|
* Add BEAST_THROWS
|
||||||
|
* Add zlib tests and fixes
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -467,7 +467,7 @@ doWrite(z_params& zs, boost::optional<Flush> flush, error_code& ec)
|
|||||||
else if(flush != Flush::block)
|
else if(flush != Flush::block)
|
||||||
{
|
{
|
||||||
/* FULL_FLUSH or SYNC_FLUSH */
|
/* FULL_FLUSH or SYNC_FLUSH */
|
||||||
tr_stored_block((char*)0, 0L, 0);
|
tr_stored_block(nullptr, 0L, 0);
|
||||||
/* For a full flush, this empty block will be recognized
|
/* For a full flush, this empty block will be recognized
|
||||||
* as a special marker by inflate_sync().
|
* as a special marker by inflate_sync().
|
||||||
*/
|
*/
|
||||||
@@ -1298,7 +1298,8 @@ copy_block(
|
|||||||
put_short((std::uint16_t)len);
|
put_short((std::uint16_t)len);
|
||||||
put_short((std::uint16_t)~len);
|
put_short((std::uint16_t)~len);
|
||||||
}
|
}
|
||||||
std::memcpy(&pending_buf_[pending_], buf, len);
|
if(buf)
|
||||||
|
std::memcpy(&pending_buf_[pending_], buf, len);
|
||||||
pending_ += len;
|
pending_ += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user