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

NULL pointer dereference in iwgif_record_pixel #9

Closed
bestshow opened this issue Apr 3, 2017 · 1 comment
Closed

NULL pointer dereference in iwgif_record_pixel #9

bestshow opened this issue Apr 3, 2017 · 1 comment

Comments

@bestshow
Copy link

bestshow commented Apr 3, 2017

on ImageWorsener 1.3.0

#imagew $FILE out.png
SEGV on unknown address 0x000000000000 (pc 0x0000005881eb bp 0x7fff07bfd4b0 sp 0x7fff07bfd310 T0)
==37476==The signal is caused by a READ memory access.
==37476==Hint: address points to the zero page.
#0 0x5881ea in iwgif_record_pixel /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:223:5
#1 0x587765 in lzw_emit_code /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:312:3
#2 0x5870ea in lzw_process_code /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:376:3
#3 0x586dd0 in lzw_process_bytes /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:433:9
#4 0x5840d0 in iwgif_read_image /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:669:7
#5 0x582413 in iwgif_read_main /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:724:9
#6 0x581bdd in iw_read_gif_file /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:773:6
#7 0x566c04 in iw_read_file_by_fmt /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-allfmts.c:61:12
#8 0x519fbe in iwcmd_run /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-cmd.c:1191:6
#9 0x516623 in iwcmd_main /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-cmd.c:3018:7
#10 0x5164f1 in main /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-cmd.c:3067:9
#11 0x7f47a59a8b34 in __libc_start_main (/lib64/libc.so.6+0x21b34)
#12 0x41bbeb in _start (/home/haojun/Downloads/testopensourcecode/imageworsener-master/imagew+0x41bbeb)

SEGV /home/haojun/Downloads/testopensourcecode/imageworsener-master/src/imagew-gif.c:223:5 in iwgif_record_pixel

testcase:
https://github.com/bestshow/p0cs/blob/master/1016-NULL-ptr-imagew-gif_223_5

Author: ADLab of Venustech

@jsummers
Copy link
Owner

jsummers commented Apr 4, 2017

Should be fixed by commit dc74009

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

2 participants