Hello,
A NULL pointer dereference in the function DumpTrackInfo in filedump.c:3007 has occurred when running program MP4Box,this can reproduce on the lattest commit.
System info：
Ubuntu 20.04.1 : clang 10.0.0 , gcc 9.3.0



[poc_read.zip](https://github.com/gpac/gpac/files/6774029/poc_read.zip)







Verification steps：
1.Get the source code of gpac
2.Compile 

```
cd gpac-master
CC=gcc CXX=g++ CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address" ./configure
make
``` 
3.run MP4Box

```
./MP4Box -info poc.mp4
```

command line info

```
...
# Track 1 Info - ID 1 - TimeScale 44100
Media Duration 00:00:01.904 
Track has 1 edits: track duration is 00:00:01.881
Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 82 samples
Segmentation fault

```

gdb info

```
Program received signal SIGSEGV, Segmentation fault.
[----------------------------------registers-----------------------------------]
RAX: 0x0 
RBX: 0x7ffffffd1950 --> 0x1000000002 
RCX: 0x5555555b11b3 ("Animation")
RDX: 0x5555555b3718 ("BIFS Scene description - %s stream\n")
RSI: 0x4 
RDI: 0x7ffff76f05c0 --> 0xfbad2887 
RBP: 0x5555555dd750 --> 0x10003 
RSP: 0x7ffffffd18e0 --> 0x0 
RIP: 0x55555558b3ba (<DumpTrackInfo+9210>:	cmp    QWORD PTR [rax+0x20],0x0)
R8 : 0x7ffffffd1860 --> 0x1 
R9 : 0x7ffff79840e9 (<GetESD+281>:	mov    r12d,eax)
R10: 0x7ffff772714e ("gf_isom_get_rvc_config")
R11: 0x7ffff794fcb0 (<gf_isom_get_rvc_config>:	endbr64)
R12: 0x1 
R13: 0x7ffffffd194c --> 0x20000ac44 
R14: 0x7ffff76f0780 --> 0x7ffff76f05c0 --> 0xfbad2887 
R15: 0x5555555d8860 --> 0x0
EFLAGS: 0x10246 (carry PARITY adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x55555558b3a9 <DumpTrackInfo+9193>:	
    lea    rcx,[rip+0x25e03]        # 0x5555555b11b3
   0x55555558b3b0 <DumpTrackInfo+9200>:	mov    rdi,QWORD PTR [r14]
   0x55555558b3b3 <DumpTrackInfo+9203>:	
    lea    rdx,[rip+0x2835e]        # 0x5555555b3718
=> 0x55555558b3ba <DumpTrackInfo+9210>:	cmp    QWORD PTR [rax+0x20],0x0             ----->rax+0x20 is a Invalid address
   0x55555558b3bf <DumpTrackInfo+9215>:	mov    r13,rax
   0x55555558b3c2 <DumpTrackInfo+9218>:	
    lea    rax,[rip+0x25df4]        # 0x5555555b11bd
   0x55555558b3c9 <DumpTrackInfo+9225>:	mov    esi,0x1
   0x55555558b3ce <DumpTrackInfo+9230>:	cmove  rcx,rax
[------------------------------------stack-------------------------------------]
0000| 0x7ffffffd18e0 --> 0x0 
0008| 0x7ffffffd18e8 --> 0x7ffffffd19a0 --> 0x0 
0016| 0x7ffffffd18f0 --> 0x7ffffffd196c --> 0x555dd52000000000 
0024| 0x7ffffffd18f8 --> 0x0 
0032| 0x7ffffffd1900 --> 0x7ffffffd1968 --> 0x0 
0040| 0x7ffffffd1908 --> 0x7fffffff8090 ("00:00:01.881")
0048| 0x7ffffffd1910 --> 0x1 
0056| 0x7ffffffd1918 --> 0xac44 
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x000055555558b3ba in DumpTrackInfo (file=file@entry=0x5555555d8860, 
    trackID=<optimized out>, trackID@entry=0x1, 
    full_dump=full_dump@entry=GF_FALSE, 
    is_track_num=is_track_num@entry=GF_TRUE, 
    dump_m4sys=dump_m4sys@entry=GF_FALSE) at filedump.c:3006
3006						GF_BIFSConfig *b_cfg = gf_odf_get_bifs_config(esd->decoderConfig->decoderSpecificInfo, esd->decoderConfig->objectTypeIndication);

```

asan info

```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1040668==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc 0x565326fa6e55 bp 0x60b0000003b0 sp 0x7ffc360dc990 T0)
==1040668==The signal is caused by a READ memory access.
==1040668==Hint: address points to the zero page.
    #0 0x565326fa6e54 in DumpTrackInfo /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3007
    #1 0x565326fb3f44 in DumpMovieInfo /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3777
    #2 0x565326f7071d in mp4boxMain /home/.../gpac/gpac-master/applications/mp4box/main.c:5991
    #3 0x7f48670170b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #4 0x565326f12f1d in _start (/home/.../gpac/gpac-master/bin/gcc/MP4Box+0x48f1d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3007 in DumpTrackInfo
==1040668==ABORTING
```

source code
```
3004 else if (esd->decoderConfig->streamType==GF_STREAM_SCENE) {
3005				if (esd->decoderConfig->objectTypeIndication<=4) {
3006					GF_BIFSConfig *b_cfg = gf_odf_get_bifs_config(esd->decoderConfig->decoderSpecificInfo, esd->decoderConfig->objectTypeIndication);
3007					fprintf(stderr, "BIFS Scene description - %s stream\n", b_cfg->elementaryMasks ? "Animation" : "Command");
3008					if (full_dump && !b_cfg->elementaryMasks) {
3009						fprintf(stderr, "\tWidth %d Height %d Pixel Metrics %s\n", b_cfg->pixelWidth, b_cfg->pixelHeight, b_cfg->pixelMetrics ? "yes" : "no");
3010					}
```
A NULL pointer dereference in the function DumpTrackInfo in filedump.c:3007 
This is a GitHub Issue
repo:gpac
owner:gpac
Title : A NULL pointer dereference in the function DumpTrackInfo in filedump.c:3007 
Issue date:

--- start body ---
Hello,
A NULL pointer dereference in the function DumpTrackInfo in filedump.c:3007 has occurred when running program MP4Box,this can reproduce on the lattest commit.
System info：
Ubuntu 20.04.1 : clang 10.0.0 , gcc 9.3.0



[poc_read.zip](https://github.com/gpac/gpac/files/6774029/poc_read.zip)







Verification steps：
1.Get the source code of gpac
2.Compile 

```
cd gpac-master
CC=gcc CXX=g++ CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address" ./configure
make
``` 
3.run MP4Box

```
./MP4Box -info poc.mp4
```

command line info

```
...
# Track 1 Info - ID 1 - TimeScale 44100
Media Duration 00:00:01.904 
Track has 1 edits: track duration is 00:00:01.881
Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 82 samples
Segmentation fault

```

gdb info

```
Program received signal SIGSEGV, Segmentation fault.
[----------------------------------registers-----------------------------------]
RAX: 0x0 
RBX: 0x7ffffffd1950 --> 0x1000000002 
RCX: 0x5555555b11b3 ("Animation")
RDX: 0x5555555b3718 ("BIFS Scene description - %s stream\n")
RSI: 0x4 
RDI: 0x7ffff76f05c0 --> 0xfbad2887 
RBP: 0x5555555dd750 --> 0x10003 
RSP: 0x7ffffffd18e0 --> 0x0 
RIP: 0x55555558b3ba (<DumpTrackInfo+9210>:	cmp    QWORD PTR [rax+0x20],0x0)
R8 : 0x7ffffffd1860 --> 0x1 
R9 : 0x7ffff79840e9 (<GetESD+281>:	mov    r12d,eax)
R10: 0x7ffff772714e ("gf_isom_get_rvc_config")
R11: 0x7ffff794fcb0 (<gf_isom_get_rvc_config>:	endbr64)
R12: 0x1 
R13: 0x7ffffffd194c --> 0x20000ac44 
R14: 0x7ffff76f0780 --> 0x7ffff76f05c0 --> 0xfbad2887 
R15: 0x5555555d8860 --> 0x0
EFLAGS: 0x10246 (carry PARITY adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x55555558b3a9 <DumpTrackInfo+9193>:	
    lea    rcx,[rip+0x25e03]        # 0x5555555b11b3
   0x55555558b3b0 <DumpTrackInfo+9200>:	mov    rdi,QWORD PTR [r14]
   0x55555558b3b3 <DumpTrackInfo+9203>:	
    lea    rdx,[rip+0x2835e]        # 0x5555555b3718
=> 0x55555558b3ba <DumpTrackInfo+9210>:	cmp    QWORD PTR [rax+0x20],0x0             ----->rax+0x20 is a Invalid address
   0x55555558b3bf <DumpTrackInfo+9215>:	mov    r13,rax
   0x55555558b3c2 <DumpTrackInfo+9218>:	
    lea    rax,[rip+0x25df4]        # 0x5555555b11bd
   0x55555558b3c9 <DumpTrackInfo+9225>:	mov    esi,0x1
   0x55555558b3ce <DumpTrackInfo+9230>:	cmove  rcx,rax
[------------------------------------stack-------------------------------------]
0000| 0x7ffffffd18e0 --> 0x0 
0008| 0x7ffffffd18e8 --> 0x7ffffffd19a0 --> 0x0 
0016| 0x7ffffffd18f0 --> 0x7ffffffd196c --> 0x555dd52000000000 
0024| 0x7ffffffd18f8 --> 0x0 
0032| 0x7ffffffd1900 --> 0x7ffffffd1968 --> 0x0 
0040| 0x7ffffffd1908 --> 0x7fffffff8090 ("00:00:01.881")
0048| 0x7ffffffd1910 --> 0x1 
0056| 0x7ffffffd1918 --> 0xac44 
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x000055555558b3ba in DumpTrackInfo (file=file@entry=0x5555555d8860, 
    trackID=<optimized out>, trackID@entry=0x1, 
    full_dump=full_dump@entry=GF_FALSE, 
    is_track_num=is_track_num@entry=GF_TRUE, 
    dump_m4sys=dump_m4sys@entry=GF_FALSE) at filedump.c:3006
3006						GF_BIFSConfig *b_cfg = gf_odf_get_bifs_config(esd->decoderConfig->decoderSpecificInfo, esd->decoderConfig->objectTypeIndication);

```

asan info

```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1040668==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc 0x565326fa6e55 bp 0x60b0000003b0 sp 0x7ffc360dc990 T0)
==1040668==The signal is caused by a READ memory access.
==1040668==Hint: address points to the zero page.
    #0 0x565326fa6e54 in DumpTrackInfo /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3007
    #1 0x565326fb3f44 in DumpMovieInfo /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3777
    #2 0x565326f7071d in mp4boxMain /home/.../gpac/gpac-master/applications/mp4box/main.c:5991
    #3 0x7f48670170b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #4 0x565326f12f1d in _start (/home/.../gpac/gpac-master/bin/gcc/MP4Box+0x48f1d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/.../gpac/gpac-master/applications/mp4box/filedump.c:3007 in DumpTrackInfo
==1040668==ABORTING
```

source code
```
3004 else if (esd->decoderConfig->streamType==GF_STREAM_SCENE) {
3005				if (esd->decoderConfig->objectTypeIndication<=4) {
3006					GF_BIFSConfig *b_cfg = gf_odf_get_bifs_config(esd->decoderConfig->decoderSpecificInfo, esd->decoderConfig->objectTypeIndication);
3007					fprintf(stderr, "BIFS Scene description - %s stream\n", b_cfg->elementaryMasks ? "Animation" : "Command");
3008					if (full_dump && !b_cfg->elementaryMasks) {
3009						fprintf(stderr, "\tWidth %d Height %d Pixel Metrics %s\n", b_cfg->pixelWidth, b_cfg->pixelHeight, b_cfg->pixelMetrics ? "yes" : "no");
3010					}
```
--- end body ---

A NULL pointer dereference vulnerability in the DumpTrackInfo function of GPAC's MP4Box allows an attacker to cause a segmentation fault by providing a specially crafted MP4 file. This can lead to a Denial of Service (DoS) condition when the application attempts to access a null pointer, resulting in a crash.