diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 902a875474..03310503d1 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1565,6 +1565,10 @@ skip: for (;;) { int track_size = size; + if (size < 0) { + ret = FFERROR_REDO; + goto leave; + } if (multitrack_type != MultitrackTypeOneTrack) { track_size = avio_rb24(s->pb);