Memory allocation errors in the latest version of libming at:
1. The function _parseABC_NS_SET_INFO_ in _util/parser.c:3081_
2. The function _readBytes_ in _util/read.c:252_

The commands for reproducing the errors:
```
./swftophp ./POC1
./swftophp ./POC2
```
Files attached here - [POCs.zip](https://github.com/libming/libming/files/10306331/POCs.zip)

Following are the traces reported by ASAN:

### ERROR 1

```
header indicates a filesize of 1751647187 but filesize is 575
<?php
$m = new SWFMovie(8);

ming_setscale(1.0);
$m->setRate(64.000000);
$m->setDimension(-3433, -1566);

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

$m->setFrames(2606);
=================================================================
==1600062==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x1a3468d1a0 bytes
    #0 0x4c14ef in malloc /home/chaitra/aflgo-top/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x54cd47 in parseABC_NS_SET_INFO /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3081:15
    #2 0x54e2b0 in parseABC_CONSTANT_POOL /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3195:5
    #3 0x551100 in parseABC_FILE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3430:3
    #4 0x552170 in parseSWF_DOABC /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3485:3
    #5 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #6 0x5094b5 in readMovie /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/main.c:269:11
    #7 0x508547 in main /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/main.c:354:2
    #8 0x7f895f48a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
```





### ERROR 2

```
header indicates a filesize of 2863137529 but filesize is 463
<?php
$m = new SWFMovie(8);

ming_setscale(1.0);
$m->setRate(151.312500);
$m->setDimension(89579, 47880);

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

$m->setFrames(63997);
 Sprite Stream out of sync...
 69 but expecting 54
 Sprite Stream out of sync...
 113 but expecting 92
 Sprite Stream out of sync...
 180 but expecting 176
 Sprite Stream out of sync...
 240 but expecting 234
=================================================================
==1626727==ERROR: AddressSanitizer: requested allocation size 0xfffffffff76b02ae (0xfffffffff76b12b0 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
    #0 0x4c14ef in malloc /home/chaitra/aflgo-top/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x5544d2 in readBytes /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/read.c:252:17
    #2 0x553335 in parseSWF_UNKNOWNBLOCK /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3555:28
    #3 0x509e88 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:148:10
    #4 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #5 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #6 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #7 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #8 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #9 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #10 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #11 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #12 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #13 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #14 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #15 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #16 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #17 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #18 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #19 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #20 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #21 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #22 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #23 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #24 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #25 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #26 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #27 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #28 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #29 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14

```
Memory allocation errors
This is a GitHub Issue
repo:libming
owner:libming
Title : Memory allocation errors
Issue date:

--- start body ---
Memory allocation errors in the latest version of libming at:
1. The function _parseABC_NS_SET_INFO_ in _util/parser.c:3081_
2. The function _readBytes_ in _util/read.c:252_

The commands for reproducing the errors:
```
./swftophp ./POC1
./swftophp ./POC2
```
Files attached here - [POCs.zip](https://github.com/libming/libming/files/10306331/POCs.zip)

Following are the traces reported by ASAN:

### ERROR 1

```
header indicates a filesize of 1751647187 but filesize is 575
<?php
$m = new SWFMovie(8);

ming_setscale(1.0);
$m->setRate(64.000000);
$m->setDimension(-3433, -1566);

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

$m->setFrames(2606);
=================================================================
==1600062==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x1a3468d1a0 bytes
    #0 0x4c14ef in malloc /home/chaitra/aflgo-top/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x54cd47 in parseABC_NS_SET_INFO /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3081:15
    #2 0x54e2b0 in parseABC_CONSTANT_POOL /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3195:5
    #3 0x551100 in parseABC_FILE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3430:3
    #4 0x552170 in parseSWF_DOABC /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3485:3
    #5 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #6 0x5094b5 in readMovie /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/main.c:269:11
    #7 0x508547 in main /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/main.c:354:2
    #8 0x7f895f48a082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
```





### ERROR 2

```
header indicates a filesize of 2863137529 but filesize is 463
<?php
$m = new SWFMovie(8);

ming_setscale(1.0);
$m->setRate(151.312500);
$m->setDimension(89579, 47880);

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

$m->setFrames(63997);
 Sprite Stream out of sync...
 69 but expecting 54
 Sprite Stream out of sync...
 113 but expecting 92
 Sprite Stream out of sync...
 180 but expecting 176
 Sprite Stream out of sync...
 240 but expecting 234
=================================================================
==1626727==ERROR: AddressSanitizer: requested allocation size 0xfffffffff76b02ae (0xfffffffff76b12b0 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
    #0 0x4c14ef in malloc /home/chaitra/aflgo-top/build/llvm_tools/llvm-11.0.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x5544d2 in readBytes /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/read.c:252:17
    #2 0x553335 in parseSWF_UNKNOWNBLOCK /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:3555:28
    #3 0x509e88 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:148:10
    #4 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #5 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #6 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #7 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #8 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #9 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #10 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #11 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #12 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #13 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #14 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #15 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #16 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #17 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #18 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #19 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #20 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #21 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #22 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #23 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #24 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #25 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #26 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #27 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14
    #28 0x542307 in parseSWF_DEFINESPRITE /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/parser.c:2316:33
    #29 0x509e59 in blockParse /home/chaitra/Desktop/fuzz-prune/experiments/libming/fuzz-results/aflgo-replay/libming/util/blocktypes.c:145:14

```
--- end body ---
