1
Fork 0
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:
asynts 2020-12-09 15:10:33 +01:00 committed by Andreas Kling
parent a34e023a33
commit ce15c9a04c
3 changed files with 18 additions and 1 deletions

View file

@ -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)