An issue was discovered in AP4_Array<AP4_CttsTableEntry>::EnsureCapacity in Core/Ap4Array.h in Bento4 1.5.1-627. Crafted MP4 input triggers an attempt at excessive memory allocation, as demonstrated by mp42hls, a related issue to CVE-2018-20095.
cpe:2.3:a:axiosys:bento4:1.5.1-627:*:*:*:*:*:*:*
F87642DF-B939-4195-A2AE-F0F1D39CD16D
OR
Hi, there.

I test the program at the master branch.

```
commit 5a0ce8023ea312a2d87c194049106e893ed57767
Merge: 91d2bc6 bab5bb9
Author: Gilles Boccon-Gibod <bok@bok.net>
Date:   Fri Dec 28 22:42:38 2018 -0800

    Merge pull request #347 from orivej/apps

    Let Scons and CMake build all apps
```

An Out of Memory problem was discovered in function AP4_Array<AP4_CttsTableEntry>::EnsureCapacity in Ap4Array.h. The program tries to allocate with a large number size( 0x6eff83000 bytes) of memory. 

Please use the "./mp4dump $POC" to reproduce the bug.
[POC.zip](https://github.com/axiomatic-systems/Bento4/files/2719261/POC.zip)

when running mp4dump, there is a out-of-memory problem in AP4_Array<AP4_CttsTableEntry>::EnsureCapacity in Ap4Array.h
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : when running mp4dump, there is a out-of-memory problem in AP4_Array<AP4_CttsTableEntry>::EnsureCapacity in Ap4Array.h
Issue date:

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

I test the program at the master branch.

```
commit 5a0ce8023ea312a2d87c194049106e893ed57767
Merge: 91d2bc6 bab5bb9
Author: Gilles Boccon-Gibod <bok@bok.net>
Date:   Fri Dec 28 22:42:38 2018 -0800

    Merge pull request #347 from orivej/apps

    Let Scons and CMake build all apps
```

An Out of Memory problem was discovered in function AP4_Array<AP4_CttsTableEntry>::EnsureCapacity in Ap4Array.h. The program tries to allocate with a large number size( 0x6eff83000 bytes) of memory. 

Please use the "./mp4dump $POC" to reproduce the bug.
[POC.zip](https://github.com/axiomatic-systems/Bento4/files/2719261/POC.zip)

--- end body ---

comments :
--- start comments ---

--- end comments ---