libsixel
libsixel copied to clipboard
SEGV error in sixel_encoder_setopt
Hello, Libsixel developers! We recently ran some fuzz testing on img2sixel 1.8.6 and encountered a SEGV bug.
Command To Reproduce the bug:
./img2sixel --outfile
Environment
- OS: Ubuntu 20.04
- gcc 9.4.0
- img2sixel 1.8.6
ASAN Report
================================================================= ==956668==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f338fb204c0 bp 0x610000000040 sp 0x7ffd8a0ab120 T0) ==956668==The signal is caused by a READ memory access. ==956668==Hint: address points to the zero page. #0 0x7f338fb204c0 in sixel_encoder_setopt (/lib/x86_64-linux-gnu/libsixel.so.1+0x3e4c0) #1 0x4ce64b in main /home/root/sp/Dataset/Libsixel/libsixel-1.8.6/converters/img2sixel.c:423:22 #2 0x7f338f69c082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #3 0x41d3fd in _start (/home/root/sp/Dataset/Libsixel/libsixel_aflpp/install/bin/img2sixel+0x41d3fd)
AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libsixel.so.1+0x3e4c0) in sixel_encoder_setopt ==956668==ABORTING
Many Thanks.