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

Segmentation Fault in sixel_decode_raw_impl at fromsixel.c:585 #111

Closed
SuhwanSong opened this issue Dec 12, 2019 · 1 comment
Closed

Segmentation Fault in sixel_decode_raw_impl at fromsixel.c:585 #111

SuhwanSong opened this issue Dec 12, 2019 · 1 comment

Comments

@SuhwanSong
Copy link

version : img2sixel 1.8.2

There is a Segmentation Fault in sixel_decode_raw_impl at fromsixel.c:585
please run following cmd to reproduce it.

img2sixel -8 $PoC

poc
ASAN LOG

=================================================================
==44545==ERROR: AddressSanitizer: SEGV on unknown address 0x610fcf9778de (pc 0x7f468023f320 bp 0x0fffe55645a0 sp 0x7fff2ab22af0 T0)
==44545==The signal is caused by a WRITE memory access.
    #0 0x7f468023f31f in sixel_decode_raw_impl /home/tmp/libsixel/src/fromsixel.c:585:54
    #1 0x7f468025565b in sixel_decode_raw /home/tmp/libsixel/src/fromsixel.c:881:14
    #2 0x7f468035facd in load_sixel /home/tmp/libsixel/src/loader.c:613:14
    #3 0x7f468035facd in load_with_builtin /home/tmp/libsixel/src/loader.c:782
    #4 0x7f468035facd in sixel_helper_load_image_file /home/tmp/libsixel/src/loader.c:1352
    #5 0x7f46805a6d4f in sixel_encoder_encode /home/tmp/libsixel/src/encoder.c:1737:14
    #6 0x51787f in main /home/tmp/libsixel/converters/img2sixel.c:457:22
    #7 0x7f467e909b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
    #8 0x41a379 in _start (/home/tmp/img2sixel+0x41a379)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/tmp/libsixel/src/fromsixel.c:585:54 in sixel_decode_raw_impl
==44545==ABORTING
@saitoha
Copy link
Owner

saitoha commented Dec 16, 2019

Fixed with 1377517, which prevents integer overflows. Thanks!

@saitoha saitoha closed this as completed Dec 16, 2019
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