Fixed null pointer ASAN error introduced in commit d41b7c23
Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
This commit is contained in:
parent
37f75773ef
commit
da3b5a664c
@ -1,6 +1,7 @@
|
||||
Version 272:
|
||||
|
||||
* 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)
|
||||
{
|
||||
/* 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
|
||||
* 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);
|
||||
}
|
||||
std::memcpy(&pending_buf_[pending_], buf, len);
|
||||
if(buf)
|
||||
std::memcpy(&pending_buf_[pending_], buf, len);
|
||||
pending_ += len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user