diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-11-07 01:31:18 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-11-08 13:38:08 +0100 |
commit | 5ff080fdfa25727abffe0fcf7dc50f6e194e02fd (patch) | |
tree | 0c30d52ce81410be54e7e21b85644ea9b6127984 | |
parent | 0f0f84071659d68a5dd048e59a0af9d64980013c (diff) | |
download | ffmpeg-5ff080fdfa25727abffe0fcf7dc50f6e194e02fd.tar.gz |
lavf/apngdec: Return EOF for incomplete files.
Fixes ticket #7536.
-rw-r--r-- | libavformat/apngdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |