mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
LibVideo/VP9: Ensure color space is not set to reserved value
This commit is contained in:
parent
9a3e9047a5
commit
9788576936
1 changed files with 3 additions and 0 deletions
|
@ -330,6 +330,9 @@ DecoderErrorOr<ColorConfig> Parser::parse_color_config(BigEndianInputBitStream&
|
||||||
}
|
}
|
||||||
|
|
||||||
auto color_space = static_cast<ColorSpace>(TRY_READ(bit_stream.read_bits(3)));
|
auto color_space = static_cast<ColorSpace>(TRY_READ(bit_stream.read_bits(3)));
|
||||||
|
if (color_space == ColorSpace::Reserved)
|
||||||
|
return DecoderError::corrupted("color_config: Color space reserved value was set"sv);
|
||||||
|
|
||||||
VERIFY(color_space <= ColorSpace::RGB);
|
VERIFY(color_space <= ColorSpace::RGB);
|
||||||
|
|
||||||
VideoFullRangeFlag video_full_range_flag;
|
VideoFullRangeFlag video_full_range_flag;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue