ffmpeg | branch: master | Carl Eugen Hoyos <ceffm...@gmail.com> | Wed Nov  7 
01:31:18 2018 +0100| [5ff080fdfa25727abffe0fcf7dc50f6e194e02fd] | committer: 
Carl Eugen Hoyos

lavf/apngdec: Return EOF for incomplete files.

Fixes ticket #7536.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ff080fdfa25727abffe0fcf7dc50f6e194e02fd
---

 libavformat/apngdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index f9a97e5681..53cdd4538e 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)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to