Ming 0.4.8 has an out-of-bounds buffer access issue in the function getString() in decompiler.c file that causes a direct segmentation fault and leads to denial of service.
Hi, there.

There is a segmentation fault in the newest master branch 04aee52.
Here is the reproducing command:
~~~~
swftophp poc
~~~~

POC:
[seg-decompile380.zip](https://github.com/libming/libming/files/5118100/seg-decompile380.zip)


Here is the reproduce trace reported by ASAN:
~~~~
==187067==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000041d8dc bp 0x0fffd003f178 sp 0x7ffe801f8bb0 T0)
    #0 0x41d8db in getString ../../util/decompile.c:380
    #1 0x424764 in decompilePUSHPARAM ../../util/decompile.c:878
    #2 0x42d225 in decompileSTARTDRAG ../../util/decompile.c:3054
    #3 0x42d225 in decompileAction ../../util/decompile.c:3433
    #4 0x44e234 in decompileActions ../../util/decompile.c:3535
    #5 0x44e234 in decompile5Action ../../util/decompile.c:3558
    #6 0x4114d9 in outputSWF_INITACTION ../../util/outputscript.c:1860
    #7 0x402836 in readMovie ../../util/main.c:281
    #8 0x402836 in main ../../util/main.c:354
    #9 0x7fe9f9c4482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #10 0x403b38 in _start (/mnt/data/playground/libming/build/util/swftophp+0x403b38)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../../util/decompile.c:380 getString
==187067==ABORTING

~~~~

The cause is due to the uncheck index of act->p.Constant8 mentioned in Figure.
<img width="1037" alt="image" src="https://user-images.githubusercontent.com/7632714/91050602-79e4d200-e651-11ea-99fa-91d3604cea1d.png">

Segmentation fault in function getString, decompile.c:380
This is a GitHub Issue
repo:libming
owner:libming
Title : Segmentation fault in function getString, decompile.c:380
Issue date:

--- start body ---
Hi, there.

There is a segmentation fault in the newest master branch 04aee52.
Here is the reproducing command:
~~~~
swftophp poc
~~~~

POC:
[seg-decompile380.zip](https://github.com/libming/libming/files/5118100/seg-decompile380.zip)


Here is the reproduce trace reported by ASAN:
~~~~
==187067==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000041d8dc bp 0x0fffd003f178 sp 0x7ffe801f8bb0 T0)
    #0 0x41d8db in getString ../../util/decompile.c:380
    #1 0x424764 in decompilePUSHPARAM ../../util/decompile.c:878
    #2 0x42d225 in decompileSTARTDRAG ../../util/decompile.c:3054
    #3 0x42d225 in decompileAction ../../util/decompile.c:3433
    #4 0x44e234 in decompileActions ../../util/decompile.c:3535
    #5 0x44e234 in decompile5Action ../../util/decompile.c:3558
    #6 0x4114d9 in outputSWF_INITACTION ../../util/outputscript.c:1860
    #7 0x402836 in readMovie ../../util/main.c:281
    #8 0x402836 in main ../../util/main.c:354
    #9 0x7fe9f9c4482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #10 0x403b38 in _start (/mnt/data/playground/libming/build/util/swftophp+0x403b38)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../../util/decompile.c:380 getString
==187067==ABORTING

~~~~

The cause is due to the uncheck index of act->p.Constant8 mentioned in Figure.
<img width="1037" alt="image" src="https://user-images.githubusercontent.com/7632714/91050602-79e4d200-e651-11ea-99fa-91d3604cea1d.png">

--- end body ---
