Commit 75647dea authored by Anton Khirnov's avatar Anton Khirnov

oggparseogm: check timing variables

Fixes a potential divide by zero.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
parent 8058284c
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment