diff --git a/libavformat/mov.c b/libavformat/mov.c index c6022d5d3a..d14ae7ee0d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1503,6 +1503,8 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_dlog(c->fc, "keyframe_count = %d\n", entries); + if (!entries) + return 0; if (entries >= UINT_MAX / sizeof(int)) return AVERROR_INVALIDDATA; sc->keyframes = av_malloc(entries * sizeof(int));