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

Continuous Memory Occupying #1457

Open
UESuperGate opened this issue Feb 15, 2023 · 0 comments
Open

Continuous Memory Occupying #1457

UESuperGate opened this issue Feb 15, 2023 · 0 comments

Comments

@UESuperGate
Copy link

Expected behavior and actual behavior.

When trying to decompress a .jp2 file to a .pgm file, opj_decompress will parse each code block. However, if a malformatted file with an extremely large amount of code blocks is received by openjpeg, it will keep parsing the blocks and finally exhaust all the memory of the OS.

Steps to reproduce the problem.

POC

It's better to set timeout in case that server gets down because of the exhaustion of memory space.

timeout 60s ./opj_decompress -i ./poc1 -o /tmp/img.pgm

At the same time, use htop to checkout memory occupied status.

Operating system

Ubuntu 20.04 with kernel 5.4.0.

openjpeg version

commit: a589155
openjp2 library v2.5.0

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

No branches or pull requests

1 participant