gpac / gpac

GPAC Ultramedia OSS for Video Streaming & Next-Gen Multimedia Transcoding, Packaging & Delivery
https://gpac.io
GNU Lesser General Public License v2.1
2.76k stars 532 forks source link

Division by zero #2066

Closed AAArdu closed 2 years ago

AAArdu commented 2 years ago

Description

There is a divison-by-zero issue caused runtime error and is detected by UndefinedBehaviorSanitizer

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-rev1663-g881c6a94a-master

Build command

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

crash command

MP4Box -isma -timescale 600 -out /dev/null poc_file

Pocs

poc.zip

Crash output

poc_13

[iso file] Unknown box type vmhf in parent minf
Converting to ISMA Audio-Video MP4 file
media_tools/isom_tools.c:558:9: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior media_tools/isom_tools.c:558:9 in /zhengjie/collect/collec.sh: line 13: 20639 Aborted (core dumped)
AAArdu commented 2 years ago

Sorry for uploading the wrong POC. This is the true poc. poc.zip