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

fix issues 1368: exist a issues of freeing uninitialized pointer in src/bin/jp2/opj_decompress.c,that will cause a segfault #1369

Merged
merged 3 commits into from
Jul 14, 2021

Conversation

xiaoxiaoafeifei
Copy link
Contributor

Fixes #1368:exist a issues of freeing uninitialized pointer in src/bin/jp2/opj_decompress.c,that will cause a segfault

Initialize the newly allocated memory

…c/bin/jp2/opj_decompress.c,that will cause a segfault
@rouault
Copy link
Collaborator

rouault commented Jul 13, 2021

could you instead modify line 1359 to be dirptr = (dircnt_t*)calloc(1, sizeof(dircnt_t)); ? (that's equivalent, but more compact)

…src/bin/jp2/opj_decompress.c,that will cause a segfault
@rouault
Copy link
Collaborator

rouault commented Jul 13, 2021

please also remove the memset() that is now useless

…src/bin/jp2/opj_decompress.c,that will cause a segfault
@xiaoxiaoafeifei
Copy link
Contributor Author

please also remove the memset() that is now useless

It has been modified. please review, thanks

@rouault rouault merged commit 0afbdcf into uclouvain:master Jul 14, 2021
DanielHeath pushed a commit to radiopaedia/openjpeg that referenced this pull request Sep 21, 2021
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.

Exist a issues of freeing uninitialized pointer in src/bin/jp2/opj_decompress.c,that will cause a segfault
2 participants