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

segfault / null pointer access in jpc_pi_destroy #30

hannob opened this issue Oct 16, 2016 · 1 comment

segfault / null pointer access in jpc_pi_destroy #30

hannob opened this issue Oct 16, 2016 · 1 comment


Copy link

@hannob hannob commented Oct 16, 2016

The attached file will crash jasper (can be tested with imginfo) with a null pointer access. It was found with american fuzzy lop.

Stack trace from address sanitizer:

==22340==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000059f33f bp 0x611000009fc8 sp 0x7fffa1dea040 T0)
    #0 0x59f33e in jpc_pi_destroy /f/jasper/src/libjasper/jpc/jpc_t2cod.c:521:10
    #1 0x54f43f in jpc_dec_tilefini /f/jasper/src/libjasper/jpc/jpc_dec.c:999:3
    #2 0x5403bd in jpc_dec_process_eoc /f/jasper/src/libjasper/jpc/jpc_dec.c:1151:3
    #3 0x547fb4 in jpc_dec_decode /f/jasper/src/libjasper/jpc/jpc_dec.c:390:10
    #4 0x547fb4 in jpc_decode /f/jasper/src/libjasper/jpc/jpc_dec.c:254
    #5 0x4f6032 in jas_image_decode /f/jasper/src/libjasper/base/jas_image.c:372:16
    #6 0x4f23cf in main /f/jasper/src/appl/imginfo.c:188:16
    #7 0x7f2ac820478f in __libc_start_main (/lib64/
    #8 0x4195d8 in _start (/r/jasper/imginfo+0x4195d8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /f/jasper/src/libjasper/jpc/jpc_t2cod.c:521:10 in jpc_pi_destroy
Copy link

@mdadams mdadams commented Oct 19, 2016

This problem is now fixed. The above test file is successfully decoded.
See commit 69a1439.

@mdadams mdadams closed this Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.