Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

A null pointer dereference was discovered in lsr_decode_laser_unit(). The vulnerability causes a segmentation fault and application crash.

**Version:**

```
MP4Box - GPAC version 1.1.0-DEV-rev1569-g2ace15eff-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
        GPAC Filters: https://doi.org/10.1145/3339825.3394929
        GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: 
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB  GPAC_DISABLE_3D
```

**System information**

```
Ubuntu 20.04 focal AMD EPYC 7742 64-Core @ 16x 2.25GHz
```

**command:**

```
./MP4Box -bt ./poc
```

[poc.zip](https://github.com/gpac/gpac/files/7724787/poc.zip)

**Result**

```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1]    3809541 segmentation fault  ./MP4Box -bt 
```

**GDB**

```
pwndbg> r
Starting program: /home/surager/raw_gpac/gpac/bin/gcc/MP4Box -bt ~/gpac/bin/gcc/outputs/crashes/id:000005,sig:11,src:000000,op:int32,pos:51597,val:be:-128 
ERROR: Could not find ELF base!
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b5d743 in lsr_decode_laser_unit () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 RAX  0x0
 RBX  0x0
 RCX  0x2010
 RDX  0x0
 RDI  0x1
 RSI  0x4
 R8   0x0
 R9   0x0
 R10  0x5555555e7000
 R11  0xfffffffffffff000
 R12  0x1
 R13  0xc2711f43
 R14  0x1
 R15  0x1
 RBP  0x5555555dcd80 —▸ 0x5555555d2650 ◂— 0x0
 RSP  0x7fffffff7310 ◂— 0x7fff00000001
 RIP  0x7ffff7b5d743 (lsr_decode_laser_unit+1923) ◂— mov    word ptr [rax], r15w
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ► 0x7ffff7b5d743 <lsr_decode_laser_unit+1923>    mov    word ptr [rax], r15w
   0x7ffff7b5d747 <lsr_decode_laser_unit+1927>    mov    word ptr [rax + 2], r14w
   0x7ffff7b5d74c <lsr_decode_laser_unit+1932>    mov    word ptr [rax + 4], r12w
   0x7ffff7b5d751 <lsr_decode_laser_unit+1937>    mov    r11d, dword ptr [rbp + 0x10]
   0x7ffff7b5d755 <lsr_decode_laser_unit+1941>    test   r11d, r11d
   0x7ffff7b5d758 <lsr_decode_laser_unit+1944>    jne    lsr_decode_laser_unit+2304 <lsr_decode_laser_unit+2304>
    ↓
   0x7ffff7b5d8c0 <lsr_decode_laser_unit+2304>    mov    edi, dword ptr [rbp + 0x40]
   0x7ffff7b5d8c3 <lsr_decode_laser_unit+2307>    add    edi, r13d
   0x7ffff7b5d8c6 <lsr_decode_laser_unit+2310>    mov    dword ptr [rbp + 0x40], edi
   0x7ffff7b5d8c9 <lsr_decode_laser_unit+2313>    jmp    lsr_decode_laser_unit+298 <lsr_decode_laser_unit+298>
    ↓
   0x7ffff7b5d0ea <lsr_decode_laser_unit+298>     call   gf_get_bit_size@plt <gf_get_bit_size@plt>
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ STACK ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffff7310 ◂— 0x7fff00000001
01:0008│     0x7fffffff7318 ◂— 0x0
02:0010│     0x7fffffff7320 —▸ 0x5555555e10d0 ◂— 0x0
03:0018│     0x7fffffff7328 —▸ 0x7ffff75e12d4 (malloc+116) ◂— mov    r8, rax
04:0020│     0x7fffffff7330 ◂— 0x2010
05:0028│     0x7fffffff7338 ◂— 0xe4cbd624cf15d700
06:0030│     0x7fffffff7340 ◂— 0x0
07:0038│     0x7fffffff7348 —▸ 0x5555555dcd80 —▸ 0x5555555d2650 ◂— 0x0
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ BACKTRACE ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ► f 0   0x7ffff7b5d743 lsr_decode_laser_unit+1923
   f 1   0x7ffff7b64a6d gf_laser_decode_command_list+333
   f 2   0x7ffff7aa4461 gf_sm_load_run_isom+1505
   f 3   0x5555555844a8 dump_isom_scene+760
   f 4   0x55555557b42c mp4boxMain+9228
   f 5   0x7ffff756b0b3 __libc_start_main+243
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> bt
#0  0x00007ffff7b5d743 in lsr_decode_laser_unit () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#1  0x00007ffff7b64a6d in gf_laser_decode_command_list () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#2  0x00007ffff7aa4461 in gf_sm_load_run_isom () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#3  0x00005555555844a8 in dump_isom_scene ()
#4  0x000055555557b42c in mp4boxMain ()
#5  0x00007ffff756b0b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe318, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe308) at ../csu/libc-start.c:308
#6  0x000055555556c45e in _start ()

```
Null Pointer Dereference in lsr_decode_laser_unit () 
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Null Pointer Dereference in lsr_decode_laser_unit () 
Issue date:

--- start body ---
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

A null pointer dereference was discovered in lsr_decode_laser_unit(). The vulnerability causes a segmentation fault and application crash.

**Version:**

```
MP4Box - GPAC version 1.1.0-DEV-rev1569-g2ace15eff-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
        GPAC Filters: https://doi.org/10.1145/3339825.3394929
        GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: 
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB  GPAC_DISABLE_3D
```

**System information**

```
Ubuntu 20.04 focal AMD EPYC 7742 64-Core @ 16x 2.25GHz
```

**command:**

```
./MP4Box -bt ./poc
```

[poc.zip](https://github.com/gpac/gpac/files/7724787/poc.zip)

**Result**

```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1]    3809541 segmentation fault  ./MP4Box -bt 
```

**GDB**

```
pwndbg> r
Starting program: /home/surager/raw_gpac/gpac/bin/gcc/MP4Box -bt ~/gpac/bin/gcc/outputs/crashes/id:000005,sig:11,src:000000,op:int32,pos:51597,val:be:-128 
ERROR: Could not find ELF base!
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 853097
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b5d743 in lsr_decode_laser_unit () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 RAX  0x0
 RBX  0x0
 RCX  0x2010
 RDX  0x0
 RDI  0x1
 RSI  0x4
 R8   0x0
 R9   0x0
 R10  0x5555555e7000
 R11  0xfffffffffffff000
 R12  0x1
 R13  0xc2711f43
 R14  0x1
 R15  0x1
 RBP  0x5555555dcd80 —▸ 0x5555555d2650 ◂— 0x0
 RSP  0x7fffffff7310 ◂— 0x7fff00000001
 RIP  0x7ffff7b5d743 (lsr_decode_laser_unit+1923) ◂— mov    word ptr [rax], r15w
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ► 0x7ffff7b5d743 <lsr_decode_laser_unit+1923>    mov    word ptr [rax], r15w
   0x7ffff7b5d747 <lsr_decode_laser_unit+1927>    mov    word ptr [rax + 2], r14w
   0x7ffff7b5d74c <lsr_decode_laser_unit+1932>    mov    word ptr [rax + 4], r12w
   0x7ffff7b5d751 <lsr_decode_laser_unit+1937>    mov    r11d, dword ptr [rbp + 0x10]
   0x7ffff7b5d755 <lsr_decode_laser_unit+1941>    test   r11d, r11d
   0x7ffff7b5d758 <lsr_decode_laser_unit+1944>    jne    lsr_decode_laser_unit+2304 <lsr_decode_laser_unit+2304>
    ↓
   0x7ffff7b5d8c0 <lsr_decode_laser_unit+2304>    mov    edi, dword ptr [rbp + 0x40]
   0x7ffff7b5d8c3 <lsr_decode_laser_unit+2307>    add    edi, r13d
   0x7ffff7b5d8c6 <lsr_decode_laser_unit+2310>    mov    dword ptr [rbp + 0x40], edi
   0x7ffff7b5d8c9 <lsr_decode_laser_unit+2313>    jmp    lsr_decode_laser_unit+298 <lsr_decode_laser_unit+298>
    ↓
   0x7ffff7b5d0ea <lsr_decode_laser_unit+298>     call   gf_get_bit_size@plt <gf_get_bit_size@plt>
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ STACK ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffff7310 ◂— 0x7fff00000001
01:0008│     0x7fffffff7318 ◂— 0x0
02:0010│     0x7fffffff7320 —▸ 0x5555555e10d0 ◂— 0x0
03:0018│     0x7fffffff7328 —▸ 0x7ffff75e12d4 (malloc+116) ◂— mov    r8, rax
04:0020│     0x7fffffff7330 ◂— 0x2010
05:0028│     0x7fffffff7338 ◂— 0xe4cbd624cf15d700
06:0030│     0x7fffffff7340 ◂— 0x0
07:0038│     0x7fffffff7348 —▸ 0x5555555dcd80 —▸ 0x5555555d2650 ◂— 0x0
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ BACKTRACE ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ► f 0   0x7ffff7b5d743 lsr_decode_laser_unit+1923
   f 1   0x7ffff7b64a6d gf_laser_decode_command_list+333
   f 2   0x7ffff7aa4461 gf_sm_load_run_isom+1505
   f 3   0x5555555844a8 dump_isom_scene+760
   f 4   0x55555557b42c mp4boxMain+9228
   f 5   0x7ffff756b0b3 __libc_start_main+243
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> bt
#0  0x00007ffff7b5d743 in lsr_decode_laser_unit () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#1  0x00007ffff7b64a6d in gf_laser_decode_command_list () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#2  0x00007ffff7aa4461 in gf_sm_load_run_isom () from /home/surager/raw_gpac/gpac/bin/gcc/libgpac.so.10
#3  0x00005555555844a8 in dump_isom_scene ()
#4  0x000055555557b42c in mp4boxMain ()
#5  0x00007ffff756b0b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe318, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe308) at ../csu/libc-start.c:308
#6  0x000055555556c45e in _start ()

```
--- end body ---
