diff --git a/libavformat/mov.c b/libavformat/mov.c index d0e01f8e57b024618a30b0fca7f8286aa91d3d6a..9deb820ebdc65da534faa8e459fa54b7a66e609a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1529,6 +1529,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));