## Environment
Ubuntu 22.04.3 LTS
## Compiler
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
## Step to reproduce
```cd libming 
./autogen.sh
./configure --disable-shared --disable-freetype
cd util
./swftophp <PoC file>
```
## Contents of PoC file
```
Unzip the file below.
```
[PoC.zip](https://github.com/libming/libming/files/13632148/PoC.zip)
## Expected behavior 
Print error or warning messages handled within swftophp.
## Current behavior
```
header indicates a filesize of 2661195422 but filesize is 70
<?php
$m = new SWFMovie(158);

ming_setscale(1.0);
$m->setRate(3.781250);
$m->setDimension(-108970, -145002);

/* Note: xMin and/or yMin are not 0! */

$m->setFrames(771);

/* SWF_DOACTION */
$m->add(new SWFAction("") );

/* SWF_DOACTION */
Stack blown!! - peek
=================================================================
==1320306==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 320 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0x55f199bdee52 in [parseSWF_DOACTION](url) (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x4be52)
    #2 0x55f199bb5ee4 in blockParse (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22ee4)
    #3 0x55f199bb53ca in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x223ca)
    #4 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #5 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc6584 in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x33584)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc659e in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x3359e)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc656a in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x3356a)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc6550 in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x33550)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 448 byte(s) leaked in 5 allocation(s).
```
Memory leaks in parseSWF_DOACTION
This is a GitHub Issue
repo:libming
owner:libming
Title : Memory leaks in parseSWF_DOACTION
Issue date:

--- start body ---
## Environment
Ubuntu 22.04.3 LTS
## Compiler
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
## Step to reproduce
```cd libming 
./autogen.sh
./configure --disable-shared --disable-freetype
cd util
./swftophp <PoC file>
```
## Contents of PoC file
```
Unzip the file below.
```
[PoC.zip](https://github.com/libming/libming/files/13632148/PoC.zip)
## Expected behavior 
Print error or warning messages handled within swftophp.
## Current behavior
```
header indicates a filesize of 2661195422 but filesize is 70
<?php
$m = new SWFMovie(158);

ming_setscale(1.0);
$m->setRate(3.781250);
$m->setDimension(-108970, -145002);

/* Note: xMin and/or yMin are not 0! */

$m->setFrames(771);

/* SWF_DOACTION */
$m->add(new SWFAction("") );

/* SWF_DOACTION */
Stack blown!! - peek
=================================================================
==1320306==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 320 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0x55f199bdee52 in [parseSWF_DOACTION](url) (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x4be52)
    #2 0x55f199bb5ee4 in blockParse (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22ee4)
    #3 0x55f199bb53ca in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x223ca)
    #4 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #5 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc6584 in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x33584)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc659e in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x3359e)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc656a in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x3356a)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6f9fcb4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x55f199bb88fe in newVar (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x258fe)
    #2 0x55f199bc6550 in decompile5Action (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x33550)
    #3 0x55f199bb1a2e in outputSWF_DOACTION (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x1ea2e)
    #4 0x55f199bb42cb in outputBlock (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x212cb)
    #5 0x55f199bb5479 in readMovie (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22479)
    #6 0x55f199bb5c3d in main (/home/smb8508/Desktop/work_space/debuging/libming/util/swftophp+0x22c3d)
    #7 0x7f6f9f829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 448 byte(s) leaked in 5 allocation(s).
```
--- end body ---

The issue describes memory leaks in the `parseSWF_DOACTION` function of the libming library, which can lead to resource exhaustion and potentially impact application stability. The leaks are detected when processing a specially crafted SWF file, indicating that the function does not properly manage memory allocation and deallocation, which could be exploited in a long-running application to consume excessive memory resources.