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

Check for NULL pointer in jp2_decode #197

Closed
wants to merge 1 commit into from

Conversation

jubalh
Copy link
Member

@jubalh jubalh commented Mar 15, 2019

@theta682
Copy link
Contributor

theta682 commented Mar 18, 2019

This fix breaks loading of some correct files. It checks incorrect place for NULL-pointer. Function jp2_getct returns interger not a pointer. Correct fix would be to check for incorrect MTYP values in CMAP box. The problematic code does not initialize dec->chantocmptlut[channo] which is used to index dec->image->cmpts_ array.

@jubalh
Copy link
Member Author

jubalh commented Mar 21, 2019

@theta682 I agree!

Tested your patch against the valid file you uploaded and against a reproducer file. Your patch is better. Do you have any more of them for the other CVEs? ;-)

Closing this in favour of #200

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