avformat/mov: reject negative ELST durations

Signed-off-by: RuoyanSu <suruoyanmashiro@qq.com>
This commit is contained in:
RuoyanSu
2025-05-18 11:44:33 +08:00
parent ca2dfc1e61
commit 92bfcaafde
+5
View File
@@ -5738,6 +5738,11 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
c->fc->nb_streams-1, i, e->time);
return AVERROR_INVALIDDATA;
}
if (e->duration < 0) {
av_log(c->fc, AV_LOG_ERROR, "Track %d, edit %d: Invalid edit list duration=%"PRId64"\n",
c->fc->nb_streams-1, i, e->duration);
return AVERROR_INVALIDDATA;
}
}
sc->elst_count = i;