]> git.sesse.net Git - ffmpeg/commitdiff
lavf/apngdec: Return EOF for incomplete files.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 7 Nov 2018 00:31:18 +0000 (01:31 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Thu, 8 Nov 2018 12:38:08 +0000 (13:38 +0100)
Fixes ticket #7536.

libavformat/apngdec.c

index f9a97e56813e12e491e2198d931765d91106f05c..53cdd4538e010b9c2ef6560adcb6bbc15e60b889 100644 (file)
@@ -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)