mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
AK: Fix unsigned integer underflow in DuplexMemoryStream::write.
This commit is contained in:
parent
a34e023a33
commit
ce15c9a04c
3 changed files with 18 additions and 1 deletions
|
@ -289,7 +289,7 @@ public:
|
|||
if ((m_write_offset + nwritten) % chunk_size == 0)
|
||||
m_chunks.append(ByteBuffer::create_uninitialized(chunk_size));
|
||||
|
||||
nwritten += bytes.copy_trimmed_to(m_chunks.last().bytes().slice(m_write_offset % chunk_size));
|
||||
nwritten += bytes.slice(nwritten).copy_trimmed_to(m_chunks.last().bytes().slice(m_write_offset % chunk_size));
|
||||
}
|
||||
|
||||
m_write_offset += nwritten;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue