==16277==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000000270 at pc 0x000000540d17 bp 0x7fffd255e5f0 sp 0x7fffd255e5e8
READ of size 1 at 0x611000000270 thread T0
    #0 0x540d16 in decompileCALLFUNCTION /libming-ming-0_4_8/util/decompile.c:2864:2
    #1 0x52d255 in decompileAction /libming-ming-0_4_8/util/decompile.c:3264:10
    #2 0x547b00 in decompileActions /libming-ming-0_4_8/util/decompile.c:3401:6
    #3 0x547706 in decompile5Action /libming-ming-0_4_8/util/decompile.c:3423:2
    #4 0x51fb11 in outputSWF_DOACTION /libming-ming-0_4_8/util/outputscript.c:1548:29
    #5 0x51cc79 in outputBlock /libming-ming-0_4_8/util/outputscript.c:2079:4
    #6 0x52912e in readMovie /libming-ming-0_4_8/util/main.c:277:4
    #7 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #8 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
    #9 0x419ed8 in _start (/libming-ming-0_4_8/util/swftocxx+0x419ed8)

0x611000000270 is located 240 bytes inside of 256-byte region [0x611000000180,0x611000000280)
freed by thread T0 here:
    #0 0x4d2968 in realloc /fuzzer/build/llvm_tools/llvm-4.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:79
    #1 0x59800e in readString /libming-ming-0_4_8/util/read.c:249:21
    #2 0x55494e in parseSWF_ACTIONRECORD /libming-ming-0_4_8/util/parser.c:952:21
    #3 0x580bf7 in parseSWF_DOACTION /libming-ming-0_4_8/util/parser.c:2434:7
    #4 0x52a1e5 in blockParse /libming-ming-0_4_8/util/blocktypes.c:145:14
    #5 0x528eeb in readMovie /libming-ming-0_4_8/util/main.c:265:11
    #6 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #7 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291

previously allocated by thread T0 here:
    #0 0x4d2558 in malloc /fuzzer/build/llvm_tools/llvm-4.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:66
    #1 0x597f1f in readString /libming-ming-0_4_8/util/read.c:242:17
    #2 0x55494e in parseSWF_ACTIONRECORD /libming-ming-0_4_8/util/parser.c:952:21
    #3 0x580bf7 in parseSWF_DOACTION /libming-ming-0_4_8/util/parser.c:2434:7
    #4 0x52a1e5 in blockParse /libming-ming-0_4_8/util/blocktypes.c:145:14
    #5 0x528eeb in readMovie /libming-ming-0_4_8/util/main.c:265:11
    #6 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #7 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291

SUMMARY: AddressSanitizer: heap-use-after-free /libming-ming-0_4_8/util/decompile.c:2864:2 in decompileCALLFUNCTION
Shadow bytes around the buggy address:
  0x0c227fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c227fff8000: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c227fff8010: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c227fff8020: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8030: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c227fff8040: fd fd fd fd fd fd fd fd fd fd fd fd fd fd[fd]fd
  0x0c227fff8050: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c227fff8060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c227fff8070: 00 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8090: 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
==16277==ABORTING
heap-use-after-free in function decompileCALLFUNCTION decompile.c 2864
This is a GitHub Issue
repo:libming
owner:libming
Title : heap-use-after-free in function decompileCALLFUNCTION decompile.c 2864
Issue date:

--- start body ---
==16277==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000000270 at pc 0x000000540d17 bp 0x7fffd255e5f0 sp 0x7fffd255e5e8
READ of size 1 at 0x611000000270 thread T0
    #0 0x540d16 in decompileCALLFUNCTION /libming-ming-0_4_8/util/decompile.c:2864:2
    #1 0x52d255 in decompileAction /libming-ming-0_4_8/util/decompile.c:3264:10
    #2 0x547b00 in decompileActions /libming-ming-0_4_8/util/decompile.c:3401:6
    #3 0x547706 in decompile5Action /libming-ming-0_4_8/util/decompile.c:3423:2
    #4 0x51fb11 in outputSWF_DOACTION /libming-ming-0_4_8/util/outputscript.c:1548:29
    #5 0x51cc79 in outputBlock /libming-ming-0_4_8/util/outputscript.c:2079:4
    #6 0x52912e in readMovie /libming-ming-0_4_8/util/main.c:277:4
    #7 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #8 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
    #9 0x419ed8 in _start (/libming-ming-0_4_8/util/swftocxx+0x419ed8)

0x611000000270 is located 240 bytes inside of 256-byte region [0x611000000180,0x611000000280)
freed by thread T0 here:
    #0 0x4d2968 in realloc /fuzzer/build/llvm_tools/llvm-4.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:79
    #1 0x59800e in readString /libming-ming-0_4_8/util/read.c:249:21
    #2 0x55494e in parseSWF_ACTIONRECORD /libming-ming-0_4_8/util/parser.c:952:21
    #3 0x580bf7 in parseSWF_DOACTION /libming-ming-0_4_8/util/parser.c:2434:7
    #4 0x52a1e5 in blockParse /libming-ming-0_4_8/util/blocktypes.c:145:14
    #5 0x528eeb in readMovie /libming-ming-0_4_8/util/main.c:265:11
    #6 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #7 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291

previously allocated by thread T0 here:
    #0 0x4d2558 in malloc /fuzzer/build/llvm_tools/llvm-4.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:66
    #1 0x597f1f in readString /libming-ming-0_4_8/util/read.c:242:17
    #2 0x55494e in parseSWF_ACTIONRECORD /libming-ming-0_4_8/util/parser.c:952:21
    #3 0x580bf7 in parseSWF_DOACTION /libming-ming-0_4_8/util/parser.c:2434:7
    #4 0x52a1e5 in blockParse /libming-ming-0_4_8/util/blocktypes.c:145:14
    #5 0x528eeb in readMovie /libming-ming-0_4_8/util/main.c:265:11
    #6 0x52772c in main /libming-ming-0_4_8/util/main.c:350:2
    #7 0x7f054e47382f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291

SUMMARY: AddressSanitizer: heap-use-after-free /libming-ming-0_4_8/util/decompile.c:2864:2 in decompileCALLFUNCTION
Shadow bytes around the buggy address:
  0x0c227fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c227fff8000: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c227fff8010: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c227fff8020: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8030: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c227fff8040: fd fd fd fd fd fd fd fd fd fd fd fd fd fd[fd]fd
  0x0c227fff8050: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c227fff8060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c227fff8070: 00 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c227fff8090: 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
==16277==ABORTING
--- end body ---
