Commit 9d36602a authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

mov: validate sidx timescale

A negative timescale doesn't make sense and triggers assertions in
av_rescale_rnd.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent a398f054
......@@ -4247,6 +4247,11 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
timescale = av_make_q(1, avio_rb32(pb));
if (timescale.den <= 0) {
av_log(c->fc, AV_LOG_ERROR, "Invalid sidx timescale 1/%d\n", timescale.den);
return AVERROR_INVALIDDATA;
}
if (version == 0) {
pts = avio_rb32(pb);
offset += avio_rb32(pb);
......
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