```
==22827==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000080 at pc 0x000000501213 bp 0x7ffe99689bb0 sp 0x7ffe99689ba8
READ of size 1 at 0x602000000080 thread T0
    #0 0x501212 in decompileIF /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:2243:57
    #1 0x4fd2c9 in decompileAction /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3242:10
    #2 0x50470c in decompileActions /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3401:6
    #3 0x507223 in decompile5Action /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3423:2
    #4 0x4f5c90 in outputSWF_DOACTION /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/outputscript.c:1548:29
    #5 0x4f88cd in outputBlock /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/outputscript.c:2079:4
    #6 0x4fbfa9 in readMovie /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:277:4
    #7 0x4fb633 in main /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:350:2
    #8 0x7f1dcb334c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
    #9 0x41cce9 in _start (/home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/swftophp+0x41cce9)
0x602000000080 is located 7 bytes to the right of 9-byte region [0x602000000070,0x602000000079)
allocated by thread T0 here:
    #0 0x4ad350 in malloc /home/eval/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
    #1 0x5212ab in readBytes /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/read.c:227:17
    #2 0x51a044 in parseSWF_JPEGTABLES /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/parser.c:2592:32
    #3 0x4fc2b0 in blockParse /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/blocktypes.c:145:14
    #4 0x4fbf39 in readMovie /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:265:11
    #5 0x4fb633 in main /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:350:2
    #6 0x7f1dcb334c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:2243:57 in decompileIF
Shadow bytes around the buggy address:
  0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff8000: fa fa 03 fa fa fa 02 fa fa fa 02 fa fa fa 00 01
=>0x0c047fff8010:[fa]fa 06 fa fa fa 01 fa fa fa 01 fa fa fa 01 fa
  0x0c047fff8020: fa fa fd fa fa fa fd fd fa fa fa fa fa fa fa fa
  0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8060: 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
==22827==ABORTING
```
[poc-6.zip](https://github.com/libming/libming/files/12116114/poc-6.zip)


heap-buffer-overflow on decompile IF
This is a GitHub Issue
repo:libming
owner:libming
Title : heap-buffer-overflow on decompile IF
Issue date:

--- start body ---
```
==22827==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000080 at pc 0x000000501213 bp 0x7ffe99689bb0 sp 0x7ffe99689ba8
READ of size 1 at 0x602000000080 thread T0
    #0 0x501212 in decompileIF /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:2243:57
    #1 0x4fd2c9 in decompileAction /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3242:10
    #2 0x50470c in decompileActions /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3401:6
    #3 0x507223 in decompile5Action /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:3423:2
    #4 0x4f5c90 in outputSWF_DOACTION /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/outputscript.c:1548:29
    #5 0x4f88cd in outputBlock /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/outputscript.c:2079:4
    #6 0x4fbfa9 in readMovie /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:277:4
    #7 0x4fb633 in main /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:350:2
    #8 0x7f1dcb334c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
    #9 0x41cce9 in _start (/home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/swftophp+0x41cce9)
0x602000000080 is located 7 bytes to the right of 9-byte region [0x602000000070,0x602000000079)
allocated by thread T0 here:
    #0 0x4ad350 in malloc /home/eval/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
    #1 0x5212ab in readBytes /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/read.c:227:17
    #2 0x51a044 in parseSWF_JPEGTABLES /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/parser.c:2592:32
    #3 0x4fc2b0 in blockParse /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/blocktypes.c:145:14
    #4 0x4fbf39 in readMovie /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:265:11
    #5 0x4fb633 in main /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/main.c:350:2
    #6 0x7f1dcb334c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/eval/Desktop/libming-CVE-2018-8962/obj-aflgo/util/../../util/decompile.c:2243:57 in decompileIF
Shadow bytes around the buggy address:
  0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c047fff8000: fa fa 03 fa fa fa 02 fa fa fa 02 fa fa fa 00 01
=>0x0c047fff8010:[fa]fa 06 fa fa fa 01 fa fa fa 01 fa fa fa 01 fa
  0x0c047fff8020: fa fa fd fa fa fa fd fd fa fa fa fa fa fa fa fa
  0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047fff8060: 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
==22827==ABORTING
```
[poc-6.zip](https://github.com/libming/libming/files/12116114/poc-6.zip)


--- end body ---
