## Description
There is a heap buffer overflow detected by AddressSanitizer

## System info
```
Ubuntu 20.04.2 LTS
clang version 12.0.0-++20210402082642+04ba60cfe598-1~exp1~20210402063359.71
MP4Box - GPAC version 1.1.0-DEV-rev1705-gc3ed3094a-master
```

## Build command
```
./configure --static-mp4box --prefix=`realpath ./install` --enable-sanitizer --cc=clang --cxx=clang++
```

## crash command
```
MP4Box -frag 0 -out /dev/null poc_file
```

## Pocs
[poc.zip](https://github.com/gpac/gpac/files/8000900/poc.zip)


## Crash output

```
==14498==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000001d98 at pc 0x000000d7a998 bp 0x7ffce025f450 sp 0x7ffce025f448
READ of size 1 at 0x603000001d98 thread T0
    #0 0xd7a997 in mp4_mux_cenc_update /programs/mp4box/builds/build8/src/filters/mux_isom.c:3779:21
    #1 0xd7db16 in mp4_mux_process_sample /programs/mp4box/builds/build8/src/filters/mux_isom.c:4125:8
    #2 0xd721d8 in mp4_mux_process_fragmented /programs/mp4box/builds/build8/src/filters/mux_isom.c:5618:8
    #3 0xd6ca6f in mp4_mux_process /programs/mp4box/builds/build8/src/filters/mux_isom.c:6048:14
    #4 0xb7d3d6 in gf_filter_process_task /programs/mp4box/builds/build8/src/filter_core/filter.c:2548:7
    #5 0xb5df8b in gf_fs_thread_proc /programs/mp4box/builds/build8/src/filter_core/filter_session.c:1793:3
    #6 0xb5ce34 in gf_fs_run /programs/mp4box/builds/build8/src/filter_core/filter_session.c:2037:2
    #7 0x9110e0 in gf_media_fragment_file /programs/mp4box/builds/build8/src/media_tools/isom_tools.c:3821:6
    #8 0x4e6fcc in mp4boxMain /programs/mp4box/builds/build8/applications/mp4box/main.c:6455:7
    #9 0x7fc1176470b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #10 0x41ea6d in _start (/programs/mp4box/builds/build8/bin/gcc/MP4Box+0x41ea6d)

0x603000001d98 is located 0 bytes to the right of 24-byte region [0x603000001d80,0x603000001d98)
allocated by thread T0 here:
    #0 0x499fe9 in realloc (/programs/mp4box/builds/build8/bin/gcc/MP4Box+0x499fe9)
    #1 0xb50901 in gf_props_assign_value /programs/mp4box/builds/build8/src/filter_core/filter_props.c:960:32
    #2 0xb50901 in gf_props_insert_property /programs/mp4box/builds/build8/src/filter_core/filter_props.c:1031:2
    #3 0xd0483e in isoffin_process /programs/mp4box/builds/build8/src/filters/isoffin_read.c:1397:6
    #4 0xb7d3d6 in gf_filter_process_task /programs/mp4box/builds/build8/src/filter_core/filter.c:2548:7
    #5 0xb5df8b in gf_fs_thread_proc /programs/mp4box/builds/build8/src/filter_core/filter_session.c:1793:3
    #6 0xb5ce34 in gf_fs_run /programs/mp4box/builds/build8/src/filter_core/filter_session.c:2037:2
    #7 0x9110e0 in gf_media_fragment_file /programs/mp4box/builds/build8/src/media_tools/isom_tools.c:3821:6
    #8 0x4e6fcc in mp4boxMain /programs/mp4box/builds/build8/applications/mp4box/main.c:6455:7
    #9 0x7fc1176470b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: heap-buffer-overflow /programs/mp4box/builds/build8/src/filters/mux_isom.c:3779:21 in mp4_mux_cenc_update
Shadow bytes around the buggy address:
  0x0c067fff8360: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00
  0x0c067fff8370: 00 fa fa fa fd fd fd fd fa fa 00 00 00 00 fa fa
  0x0c067fff8380: fd fd fd fa fa fa 00 00 00 fa fa fa 00 00 00 00
  0x0c067fff8390: fa fa 00 00 00 06 fa fa fd fd fd fa fa fa fd fd
  0x0c067fff83a0: fd fd fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa
=>0x0c067fff83b0: 00 00 00[fa]fa fa 00 00 00 00 fa fa 00 00 00 fa
  0x0c067fff83c0: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00
  0x0c067fff83d0: 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff83e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff83f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==14498==ABORTING
```
There is a heap buffer overflow detected by AddressSanitizer
This is a GitHub Issue
repo:gpac
owner:gpac
Title : There is a heap buffer overflow detected by AddressSanitizer
Issue date:

--- start body ---
## Description
There is a heap buffer overflow detected by AddressSanitizer

## System info
```
Ubuntu 20.04.2 LTS
clang version 12.0.0-++20210402082642+04ba60cfe598-1~exp1~20210402063359.71
MP4Box - GPAC version 1.1.0-DEV-rev1705-gc3ed3094a-master
```

## Build command
```
./configure --static-mp4box --prefix=`realpath ./install` --enable-sanitizer --cc=clang --cxx=clang++
```

## crash command
```
MP4Box -frag 0 -out /dev/null poc_file
```

## Pocs
[poc.zip](https://github.com/gpac/gpac/files/8000900/poc.zip)


## Crash output

```
==14498==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000001d98 at pc 0x000000d7a998 bp 0x7ffce025f450 sp 0x7ffce025f448
READ of size 1 at 0x603000001d98 thread T0
    #0 0xd7a997 in mp4_mux_cenc_update /programs/mp4box/builds/build8/src/filters/mux_isom.c:3779:21
    #1 0xd7db16 in mp4_mux_process_sample /programs/mp4box/builds/build8/src/filters/mux_isom.c:4125:8
    #2 0xd721d8 in mp4_mux_process_fragmented /programs/mp4box/builds/build8/src/filters/mux_isom.c:5618:8
    #3 0xd6ca6f in mp4_mux_process /programs/mp4box/builds/build8/src/filters/mux_isom.c:6048:14
    #4 0xb7d3d6 in gf_filter_process_task /programs/mp4box/builds/build8/src/filter_core/filter.c:2548:7
    #5 0xb5df8b in gf_fs_thread_proc /programs/mp4box/builds/build8/src/filter_core/filter_session.c:1793:3
    #6 0xb5ce34 in gf_fs_run /programs/mp4box/builds/build8/src/filter_core/filter_session.c:2037:2
    #7 0x9110e0 in gf_media_fragment_file /programs/mp4box/builds/build8/src/media_tools/isom_tools.c:3821:6
    #8 0x4e6fcc in mp4boxMain /programs/mp4box/builds/build8/applications/mp4box/main.c:6455:7
    #9 0x7fc1176470b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #10 0x41ea6d in _start (/programs/mp4box/builds/build8/bin/gcc/MP4Box+0x41ea6d)

0x603000001d98 is located 0 bytes to the right of 24-byte region [0x603000001d80,0x603000001d98)
allocated by thread T0 here:
    #0 0x499fe9 in realloc (/programs/mp4box/builds/build8/bin/gcc/MP4Box+0x499fe9)
    #1 0xb50901 in gf_props_assign_value /programs/mp4box/builds/build8/src/filter_core/filter_props.c:960:32
    #2 0xb50901 in gf_props_insert_property /programs/mp4box/builds/build8/src/filter_core/filter_props.c:1031:2
    #3 0xd0483e in isoffin_process /programs/mp4box/builds/build8/src/filters/isoffin_read.c:1397:6
    #4 0xb7d3d6 in gf_filter_process_task /programs/mp4box/builds/build8/src/filter_core/filter.c:2548:7
    #5 0xb5df8b in gf_fs_thread_proc /programs/mp4box/builds/build8/src/filter_core/filter_session.c:1793:3
    #6 0xb5ce34 in gf_fs_run /programs/mp4box/builds/build8/src/filter_core/filter_session.c:2037:2
    #7 0x9110e0 in gf_media_fragment_file /programs/mp4box/builds/build8/src/media_tools/isom_tools.c:3821:6
    #8 0x4e6fcc in mp4boxMain /programs/mp4box/builds/build8/applications/mp4box/main.c:6455:7
    #9 0x7fc1176470b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: heap-buffer-overflow /programs/mp4box/builds/build8/src/filters/mux_isom.c:3779:21 in mp4_mux_cenc_update
Shadow bytes around the buggy address:
  0x0c067fff8360: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00
  0x0c067fff8370: 00 fa fa fa fd fd fd fd fa fa 00 00 00 00 fa fa
  0x0c067fff8380: fd fd fd fa fa fa 00 00 00 fa fa fa 00 00 00 00
  0x0c067fff8390: fa fa 00 00 00 06 fa fa fd fd fd fa fa fa fd fd
  0x0c067fff83a0: fd fd fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa
=>0x0c067fff83b0: 00 00 00[fa]fa fa 00 00 00 00 fa fa 00 00 00 fa
  0x0c067fff83c0: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00
  0x0c067fff83d0: 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff83e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff83f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c067fff8400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==14498==ABORTING
```
--- end body ---
