An issue was discovered in GPAC version 0.8.0 and 0.9.0-development-20191109. There is a memory leak in dinf_New() in isomedia/box_code_base.c.
cpe:2.3:a:gpac:gpac:0.8.0:*:*:*:*:*:*:*
93EEFCFD-7417-40E6-84BF-4EA630F2A8A1
cpe:2.3:a:gpac:gpac:0.9.0:*:*:*:*:*:*:*
1EA85977-716F-48A1-8199-B8A7847AF223
OR
System info:  
Ubuntu 16.04.6 LTS, X64, gcc 5.4.0, gpac (master 6ada10e)  
Compile Command:
```
$ CC="gcc -fsanitize=address -g" CXX="g++ -fsanitize=address -g" ./configure --static-mp4box
$ make
```
Run Command:
```
$ MP4Box -diso -out /dev/null $POC-memory-leak
```
POC file:  
https://github.com/Clingto/POC/blob/master/gpac-MP4Box/POC-memory-leak  
ASAN info:
```C
==26273==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad2eed in dinf_New isomedia/box_code_base.c:945

Indirect leak of 160 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02961 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98961)
    #1 0x46c43a in realloc_chain utils/list.c:622
    #2 0x46c43a in gf_list_add utils/list.c:629

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad1d0d in url_New isomedia/box_code_base.c:575

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad318d in dref_New isomedia/box_code_base.c:1005

Indirect leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x46c27d in gf_list_new utils/list.c:602

SUMMARY: AddressSanitizer: 448 byte(s) leaked in 10 allocation(s).

```
---
Edit

This bug issue still exists in latest version 0.8.0: 4c19ae5 and 0.9.0: 1de1f8d

---

Addition: This bug was found with our fuzzer, which is based on AFL. Our fuzzer is developed by Yuanpingyu(cfenicey@gmail.com) 、Yanhao and Marsman1996(lqliuyuwei@outlook.com)
AddressSanitizer: a memory leak of dinf_New()
This is a GitHub Issue
repo:gpac
owner:gpac
Title : AddressSanitizer: a memory leak of dinf_New()
Issue date:

--- start body ---
System info:  
Ubuntu 16.04.6 LTS, X64, gcc 5.4.0, gpac (master 6ada10e)  
Compile Command:
```
$ CC="gcc -fsanitize=address -g" CXX="g++ -fsanitize=address -g" ./configure --static-mp4box
$ make
```
Run Command:
```
$ MP4Box -diso -out /dev/null $POC-memory-leak
```
POC file:  
https://github.com/Clingto/POC/blob/master/gpac-MP4Box/POC-memory-leak  
ASAN info:
```C
==26273==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad2eed in dinf_New isomedia/box_code_base.c:945

Indirect leak of 160 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02961 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98961)
    #1 0x46c43a in realloc_chain utils/list.c:622
    #2 0x46c43a in gf_list_add utils/list.c:629

Indirect leak of 96 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad1d0d in url_New isomedia/box_code_base.c:575

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0xad318d in dref_New isomedia/box_code_base.c:1005

Indirect leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0x7ffff6f02602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x46c27d in gf_list_new utils/list.c:602

SUMMARY: AddressSanitizer: 448 byte(s) leaked in 10 allocation(s).

```
---
Edit

This bug issue still exists in latest version 0.8.0: 4c19ae5 and 0.9.0: 1de1f8d

---

Addition: This bug was found with our fuzzer, which is based on AFL. Our fuzzer is developed by Yuanpingyu(cfenicey@gmail.com) 、Yanhao and Marsman1996(lqliuyuwei@outlook.com)
--- end body ---

comments :
--- start comments ---

--- end comments ---