mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
LibGfx/JPEG2000: Allow COD, COC, QCD, QCC, RGN only in first tile-part
(The FIXME was incomplete, it didn't mention RGN also only being valid in a tile's first tile-part header.)
This commit is contained in:
parent
1df5c01bfb
commit
7b7ef7dcc7
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/nico
Commit: 7b7ef7dcc7
Pull-request: https://github.com/SerenityOS/serenity/pull/23901
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 1 deletions
|
@ -597,12 +597,14 @@ static ErrorOr<void> parse_codestream_tile_header(JPEG2000LoadingContext& contex
|
|||
context.codestream_cursor += 2;
|
||||
found_start_of_data = true;
|
||||
break;
|
||||
// FIXME: COD, COC, QCD, QCC are only valid on the first tile part header, reject them in non-first tile part headers.
|
||||
case J2K_COD:
|
||||
case J2K_COC:
|
||||
case J2K_QCD:
|
||||
case J2K_QCC:
|
||||
case J2K_RGN:
|
||||
if (start_of_tile.tile_part_index != 0)
|
||||
return Error::from_string_literal("JPEG2000ImageDecoderPlugin: COD, COC, QCD, QCC, RGN markers are only valid in the first tile-part header");
|
||||
[[fallthrough]];
|
||||
case J2K_POC:
|
||||
case J2K_PPT:
|
||||
case J2K_PLT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue