==11942==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000000690 at pc 0x00000092ce96 bp 0x7fff21d34940 sp 0x7fff21d34938
WRITE of size 8 at 0x607000000690 thread T0
#0 0x92ce95 in draw_stroke /home/bupt/Desktop/swftools/lib/gfxpoly/stroke.c:207:17
#1 0x92e224 in gfxpoly_from_stroke /home/bupt/Desktop/swftools/lib/gfxpoly/stroke.c:226:5
#2 0x90989c in polyops_stroke /home/bupt/Desktop/swftools/lib/devices/polyops.c:229:23
#3 0x7c1563 in VectorGraphicOutputDev::strokeGfxline(GfxState*, _gfxline*, int) /home/bupt/Desktop/swftools/lib/pdf/VectorGraphicOutputDev.cc:612:9
#4 0x7cd69e in VectorGraphicOutputDev::stroke(GfxState*) /home/bupt/Desktop/swftools/lib/pdf/VectorGraphicOutputDev.cc:1487:5
#5 0x6eeffa in Gfx::opStroke(Object*, int) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Gfx.cc:1415:12
#6 0x705f02 in Gfx::execOp(Object*, Object*, int) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Gfx.cc:693:3
#7 0x7049c1 in Gfx::go(int) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Gfx.cc:584:7
#8 0x703ea8 in Gfx::display(Object*, int) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Gfx.cc:556:3
#9 0x6b9401 in Page::displaySlice(OutputDev*, double, double, int, int, int, int, int, int, int, int, Catalog*, int (*)(void*), void*) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Page.cc:317:10
#10 0x6b8cee in Page::display(OutputDev*, double, double, int, int, int, int, Catalog*, int (*)(void*), void*) /home/bupt/Desktop/swftools/lib/pdf/xpdf/Page.cc:264:3
#11 0x6099b0 in PDFDoc::displayPage(OutputDev*, int, double, double, int, int, int, int, int (*)(void*), void*) /home/bupt/Desktop/swftools/lib/pdf/xpdf/PDFDoc.cc:317:27
#12 0x5f87d5 in render2(_gfxpage*, _gfxdevice*, int, int, int, int, int, int) /home/bupt/Desktop/swftools/lib/pdf/pdf.cc:164:14
#13 0x5f8e64 in pdfpage_rendersection(_gfxpage*, _gfxdevice*, double, double, double, double, double, double) /home/bupt/Desktop/swftools/lib/pdf/pdf.cc:190:5
#14 0x501816 in main /home/bupt/Desktop/swftools/src/pdf2swf.c:832:3
#15 0x7f395ddd6c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
#16 0x420b99 in _start (/home/bupt/Desktop/swftools/build/bin/pdf2swf+0x420b99)
0x607000000690 is located 0 bytes to the right of 80-byte region [0x607000000640,0x607000000690)
allocated by thread T0 here:
#0 0x4b3160 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x92c94f in draw_stroke /home/bupt/Desktop/swftools/lib/gfxpoly/stroke.c:192:26
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/bupt/Desktop/swftools/lib/gfxpoly/stroke.c:207:17 in draw_stroke
Shadow bytes around the buggy address:
0x0c0e7fff8080: fa fa fd fd fd fd fd fd fd fd fd fd fa fa fa fa
0x0c0e7fff8090: fd fd fd fd fd fd fd fd fd fa fa fa fa fa fd fd
0x0c0e7fff80a0: fd fd fd fd fd fd fd fa fa fa fa fa fd fd fd fd
0x0c0e7fff80b0: fd fd fd fd fd fd fa fa fa fa fd fd fd fd fd fd
0x0c0e7fff80c0: fd fd fd fa fa fa fa fa 00 00 00 00 00 00 00 00
=>0x0c0e7fff80d0: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff80f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff8100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff8110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0e7fff8120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==11942==ABORTING
heap buffer overflow
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id458_heap_overflow_draw_stroke.zip
crash info
Stack buffer overflow
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id407_stack_overflow_getcurrentthread.zip
crash info
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id465_stack_overflow_buffered_vfprintf.zip
crash info
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id479_stack_overflow___asanAllocatorAllocate.zip
crash info
memory leak
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id472_memory_leak.zip
crash info
SEGV
reproduce
command to reproduce: ./pdf2swf -G -f -t [sample file] -o /dev/null
sample file
id382_SEGV_getchar.zip
crash info
The text was updated successfully, but these errors were encountered: