## 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-rev1671-g0cd19f4db-master
```

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

## crash command
MP4Box -3gp -out /dev/null poc_file
## Pocs
[poc.zip](https://github.com/gpac/gpac/files/7950756/poc.zip)
## Crash output
poc_3.mp4
```
==11303==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000000930 at pc 0x000001591712 bp 0x7fff751c1d90 sp 0x7fff751c1d88
READ of size 4 at 0x607000000930 thread T0
    #0 0x1591711 in stsz_box_read /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5724:24
    #1 0x8d6e8d in gf_isom_box_parse_ex /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:264:14
    #2 0x8d5ebd in gf_isom_parse_root_box /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:38:8
    #3 0x8f59ed in gf_isom_parse_movie_boxes_internal /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:349:7
    #4 0x8fb5ab in gf_isom_open_file /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:932:19
    #5 0x4e5396 in mp4boxMain /programs/mp4box/builds/build3/applications/mp4box/main.c:5984:12
    #6 0x7f4de75ed0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #7 0x41ea6d in _start (/programs/mp4box/builds/build3/bin/gcc/MP4Box+0x41ea6d)

0x607000000930 is located 0 bytes to the right of 80-byte region [0x6070000008e0,0x607000000930)
allocated by thread T0 here:
    #0 0x499ccd in malloc (/programs/mp4box/builds/build3/bin/gcc/MP4Box+0x499ccd)
    #1 0x1590d8d in stsz_box_read /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5703:24
    #2 0x8d6e8d in gf_isom_box_parse_ex /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:264:14
    #3 0x8d5ebd in gf_isom_parse_root_box /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:38:8
    #4 0x8f59ed in gf_isom_parse_movie_boxes_internal /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:349:7
    #5 0x8fb5ab in gf_isom_open_file /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:932:19
    #6 0x4e5396 in mp4boxMain /programs/mp4box/builds/build3/applications/mp4box/main.c:5984:12
    #7 0x7f4de75ed0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: heap-buffer-overflow /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5724:24 in stsz_box_read
Shadow bytes around the buggy address:
  0x0c0e7fff80d0: 00 00 fa fa fa fa 00 00 00 00 00 00 00 00 06 fa
  0x0c0e7fff80e0: fa fa fa fa 00 00 00 00 00 00 00 00 02 fa fa fa
  0x0c0e7fff80f0: fa fa 00 00 00 00 00 00 00 00 00 fa fa fa fa fa
  0x0c0e7fff8100: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa 00 00
  0x0c0e7fff8110: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
=>0x0c0e7fff8120: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8130: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8140: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8150: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8160: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8170: 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
==11303==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-rev1671-g0cd19f4db-master
```

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

## crash command
MP4Box -3gp -out /dev/null poc_file
## Pocs
[poc.zip](https://github.com/gpac/gpac/files/7950756/poc.zip)
## Crash output
poc_3.mp4
```
==11303==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000000930 at pc 0x000001591712 bp 0x7fff751c1d90 sp 0x7fff751c1d88
READ of size 4 at 0x607000000930 thread T0
    #0 0x1591711 in stsz_box_read /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5724:24
    #1 0x8d6e8d in gf_isom_box_parse_ex /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:264:14
    #2 0x8d5ebd in gf_isom_parse_root_box /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:38:8
    #3 0x8f59ed in gf_isom_parse_movie_boxes_internal /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:349:7
    #4 0x8fb5ab in gf_isom_open_file /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:932:19
    #5 0x4e5396 in mp4boxMain /programs/mp4box/builds/build3/applications/mp4box/main.c:5984:12
    #6 0x7f4de75ed0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #7 0x41ea6d in _start (/programs/mp4box/builds/build3/bin/gcc/MP4Box+0x41ea6d)

0x607000000930 is located 0 bytes to the right of 80-byte region [0x6070000008e0,0x607000000930)
allocated by thread T0 here:
    #0 0x499ccd in malloc (/programs/mp4box/builds/build3/bin/gcc/MP4Box+0x499ccd)
    #1 0x1590d8d in stsz_box_read /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5703:24
    #2 0x8d6e8d in gf_isom_box_parse_ex /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:264:14
    #3 0x8d5ebd in gf_isom_parse_root_box /programs/mp4box/builds/build3/src/isomedia/box_funcs.c:38:8
    #4 0x8f59ed in gf_isom_parse_movie_boxes_internal /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:349:7
    #5 0x8fb5ab in gf_isom_open_file /programs/mp4box/builds/build3/src/isomedia/isom_intern.c:932:19
    #6 0x4e5396 in mp4boxMain /programs/mp4box/builds/build3/applications/mp4box/main.c:5984:12
    #7 0x7f4de75ed0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: heap-buffer-overflow /programs/mp4box/builds/build3/src/isomedia/box_code_base.c:5724:24 in stsz_box_read
Shadow bytes around the buggy address:
  0x0c0e7fff80d0: 00 00 fa fa fa fa 00 00 00 00 00 00 00 00 06 fa
  0x0c0e7fff80e0: fa fa fa fa 00 00 00 00 00 00 00 00 02 fa fa fa
  0x0c0e7fff80f0: fa fa 00 00 00 00 00 00 00 00 00 fa fa fa fa fa
  0x0c0e7fff8100: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa 00 00
  0x0c0e7fff8110: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
=>0x0c0e7fff8120: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8130: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8140: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8150: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8160: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c0e7fff8170: 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
==11303==ABORTING
```
--- end body ---
