1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:47:44 +00:00

AK: Reject BitStream reads beyond EOF by default

The only exception to this is the lossless WebP decoder, which
legitimately relies on this behavior, even upstream.
This commit is contained in:
Tim Schumacher 2023-11-11 13:57:48 +01:00 committed by Andreas Kling
parent cb03d3d78f
commit 197331c922
2 changed files with 3 additions and 3 deletions

View file

@ -156,7 +156,7 @@ public:
FillWithZero,
};
explicit LittleEndianInputBitStream(MaybeOwned<Stream> stream, UnsatisfiableReadBehavior unsatisfiable_read_behavior = UnsatisfiableReadBehavior::FillWithZero)
explicit LittleEndianInputBitStream(MaybeOwned<Stream> stream, UnsatisfiableReadBehavior unsatisfiable_read_behavior = UnsatisfiableReadBehavior::Reject)
: LittleEndianBitStream(move(stream))
, m_unsatisfiable_read_behavior(unsatisfiable_read_behavior)
{