mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
LibVideo/VP9: Ensure range decoder size is within expected range
This commit is contained in:
parent
fefbbff0a5
commit
b3d5f9748a
|
@ -61,6 +61,9 @@ public:
|
|||
|
||||
DecoderErrorOr<BooleanDecoder> create_range_decoder(size_t size)
|
||||
{
|
||||
if (size > stream->remaining())
|
||||
return DecoderError::corrupted("Range decoder size invalid"sv);
|
||||
|
||||
auto compressed_header_data = ReadonlyBytes(stream_data.data() + stream->offset(), size);
|
||||
|
||||
// 9.2.1: The Boolean decoding process specified in section 9.2.2 is invoked to read a marker syntax element from the
|
||||
|
|
Loading…
Reference in a new issue