Skip to content

Raise error when seeking, rather than when starting box#1

Merged
nevercodecorrect merged 1 commit into
nevercodecorrect:jp2-oversized-box-lengthfrom
radarhere:jp2-oversized-box-length
Jul 23, 2026
Merged

Raise error when seeking, rather than when starting box#1
nevercodecorrect merged 1 commit into
nevercodecorrect:jp2-oversized-box-lengthfrom
radarhere:jp2-oversized-box-length

Conversation

@radarhere

Copy link
Copy Markdown

Suggestion for python-pillow#9818

It's hard to say about how helpful this is without a real file to use as an example, but it seems to me that it would be better to read what data we can from the image - if we move the error, we can still read the start of the box, and next_box_type() can still return a valid tbox, which could theoretically be useful.

@radarhere
radarhere force-pushed the jp2-oversized-box-length branch from 0bab2d2 to 0dbd3c6 Compare July 23, 2026 08:49
@radarhere
radarhere force-pushed the jp2-oversized-box-length branch from 0dbd3c6 to 884460a Compare July 23, 2026 12:59
@nevercodecorrect
nevercodecorrect merged commit 92506df into nevercodecorrect:jp2-oversized-box-length Jul 23, 2026
40 of 41 checks passed
@radarhere
radarhere deleted the jp2-oversized-box-length branch July 23, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants