Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow header length to be zero in non-zero length packet #1526

Merged
merged 1 commit into from May 6, 2024

Conversation

radarhere
Copy link
Contributor

Resolves #1524

Investigating the file attached to that issue, I found that at

l_header_length = (OPJ_UINT32)(l_header_data - *l_header_data_start);

the header length was sometimes set to zero.

It seems intuitively not good for the header length to be zero in non-zero length packet, so I suggest returning OPJ_FALSE for that situation.

If this isn't a good solution, thanks for your time, and please let me know what I've missed.

@rouault rouault merged commit 70e6263 into uclouvain:master May 6, 2024
12 checks passed
@radarhere radarhere deleted the header_length branch May 6, 2024 22:04
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.

opj_decode_tile_data takes a long time to decode a very small file
2 participants