FLIF-hub / FLIF

Free Lossless Image Format
Other
3.72k stars 229 forks source link

ERROR-Segmentation fault-TransformPaletteC<FileIO>::save () #505

Open EnchantedJohn opened 6 years ago

EnchantedJohn commented 6 years ago

the fifth error is : Starting program: /home/lx/5_7/flif/flif/src/flif -e crashes/id\:000014\,sig\:11\,src\:000110\,op\:havoc\,rep\:4 test5.flif --overwrite Warning: expected ".png", ".pnm" or ".pam" file name extension for input file, trying anyway...

Program received signal SIGSEGV, Segmentation fault. TransformPaletteC::save (this=, srcRanges=0xd05aa0, rac=...) at transform/palette_C.hpp:156 156 coder.write_int(0, srcRanges->max(p)-min-remaining, CPalette_vector[p][i]-min);

EnchantedJohn commented 6 years ago

(gdb) bt

0 TransformPaletteC::save (this=, srcRanges=0xd05aa0, rac=...) at transform/palette_C.hpp:156

1 0x0000000000670199 in flif_encode (io=..., images=std::vector of length 1, capacity 1 = {...}, transDesc=std::vector of length 6, capacity 8 = {...}, options=...) at flif-enc.cpp:927

2 0x000000000045ea4d in encode_flif (argc=, argv=0x7fffffffe318, images=std::vector of length 1, capacity 1 = {...}, options=...) at flif.cpp:344

3 0x0000000000407c03 in main (argc=, argv=0x7fffffffe310) at flif.cpp:763

EnchantedJohn commented 6 years ago

(gdb) x/8r $pc 0x597e80 <TransformPaletteC::save(ColorRanges const, RacOutput24&) const+432>: -1105425594 1275497289 1955329929 692394020 0x597e90 <TransformPaletteC::save(ColorRanges const, RacOutput24&) const+448>: -578206493 1210077439 -1339769717 1140850752

EnchantedJohn commented 6 years ago

(gdb) i r rax 0x0 0 rbx 0x0 0 rcx 0xd05130 13652272 rdx 0x3 3 rsi 0x100d05c40 4308622400 rdi 0xd05aa0 13654688 rbp 0x7 0x7 rsp 0x7fffffff9b60 0x7fffffff9b60 r8 0x7fffffffdd90 140737488346512 r9 0xffffffffc0000005 -1073741819 r10 0xc0000004 3221225476 r11 0x0 0 r12 0x0 0 r13 0xd05ad8 13654744 r14 0xd05aa0 13654688 r15 0x0 0 rip 0x597e80 0x597e80 <TransformPaletteC::save(ColorRanges const*, RacOutput24&) const+432> eflags 0x10286 [ PF SF IF RF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0

EnchantedJohn commented 6 years ago

when I used AFL, I finally found 196 crash. I think it is a very important problem. hope guys will fix it :)