mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:37:44 +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
|
@ -208,4 +208,12 @@ TEST_CASE(offset_of_out_of_bounds)
|
|||
EXPECT(!stream.offset_of(target).has_value());
|
||||
}
|
||||
|
||||
TEST_CASE(unsigned_integer_underflow_regression)
|
||||
{
|
||||
Array<u8, DuplexMemoryStream::chunk_size + 1> buffer;
|
||||
|
||||
DuplexMemoryStream stream;
|
||||
stream << buffer;
|
||||
}
|
||||
|
||||
TEST_MAIN(MemoryStream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue