mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 13:50:50 +08:00
oggparseogm: check timing variables
Fixes a potential divide by zero. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org (cherry picked from commit75647dea6f) Signed-off-by: Reinhard Tartler <siretart@tauware.de> (cherry picked from commitbf7c240a50) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
committed by
Reinhard Tartler
parent
e03b875c0b
commit
b0db7a523d
@@ -75,6 +75,11 @@ ogm_header(AVFormatContext *s, int idx)
|
||||
|
||||
time_unit = bytestream2_get_le64(&p);
|
||||
spu = bytestream2_get_le64(&p);
|
||||
if (!time_unit || !spu) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid timing values.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
bytestream2_skip(&p, 4); /* default_len */
|
||||
bytestream2_skip(&p, 8); /* buffersize + bits_per_sample */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user