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/

# Version 
```

MP4Box - GPAC version 2.3-DEV-rev1-g4669ba229-master
(c) 2000-2022 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: --enable-sanitizer --enable-debug
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
```
# Reproduce 
complie and run 
```
./configure --enable-sanitizer --enable-debug
make
./MP4Box -dxml buffer_overflow_av_parsers_c_5684
```
information reported by sanitizer 
```

[isom/avcc] Missing REXT profile signaling, patching.
[iso file] Box "stsz" (start 771) has 40 extra bytes
[iso file] Unknown box type 00000000 in parent moov
[isom/avcc] Missing REXT profile signaling, patching.
[iso file] Box "stsz" (start 771) has 40 extra bytes
[iso file] Unknown box type 00000000 in parent moov
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[avc-h264] Unknown aspect_ratio_idc: your video may have a wrong aspect ratio. Contact the GPAC team!
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[avc-h264] invalid SPS: log2_max_frame_num_minus4 shall be less than 12, but is 21
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
media_tools/av_parsers.c:5684:21: runtime error: index 128 out of bounds for type 'AVC_SPS [32]'
```
# Poc 
https://drive.google.com/file/d/1wf2-Yk4cijCPcQd33P9PQ8ADokG_sG4i/view?usp=sharing
Buffer overflow in function avc_parse_slice of media_tools/av_parsers.c:5684
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Buffer overflow in function avc_parse_slice of media_tools/av_parsers.c:5684
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/

# Version 
```

MP4Box - GPAC version 2.3-DEV-rev1-g4669ba229-master
(c) 2000-2022 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: --enable-sanitizer --enable-debug
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
```
# Reproduce 
complie and run 
```
./configure --enable-sanitizer --enable-debug
make
./MP4Box -dxml buffer_overflow_av_parsers_c_5684
```
information reported by sanitizer 
```

[isom/avcc] Missing REXT profile signaling, patching.
[iso file] Box "stsz" (start 771) has 40 extra bytes
[iso file] Unknown box type 00000000 in parent moov
[isom/avcc] Missing REXT profile signaling, patching.
[iso file] Box "stsz" (start 771) has 40 extra bytes
[iso file] Unknown box type 00000000 in parent moov
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[avc-h264] Unknown aspect_ratio_idc: your video may have a wrong aspect ratio. Contact the GPAC team!
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[avc-h264] invalid SPS: log2_max_frame_num_minus4 shall be less than 12, but is 21
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
media_tools/av_parsers.c:5684:21: runtime error: index 128 out of bounds for type 'AVC_SPS [32]'
```
# Poc 
https://drive.google.com/file/d/1wf2-Yk4cijCPcQd33P9PQ8ADokG_sG4i/view?usp=sharing
--- end body ---
