X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fapngdec.c;h=53cdd4538e010b9c2ef6560adcb6bbc15e60b889;hb=ba0a56e0b00474eb0e47d503b139816fe28c47e5;hp=f9a97e56813e12e491e2198d931765d91106f05c;hpb=73d193d1d0ff62a029a905d1404c0fd357f4c880;p=ffmpeg diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c index f9a97e56813..53cdd4538e0 100644 --- a/libavformat/apngdec.c +++ b/libavformat/apngdec.c @@ -342,6 +342,10 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt) len = avio_rb32(pb); tag = avio_rl32(pb); + + if (avio_feof(pb)) + return AVERROR_EOF; + switch (tag) { case MKTAG('f', 'c', 'T', 'L'): if (len != 26)