summaryrefslogtreecommitdiff
path: root/libavformat/apngdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-11-07 01:31:18 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-11-08 13:38:08 +0100
commit5ff080fdfa25727abffe0fcf7dc50f6e194e02fd (patch)
tree0c30d52ce81410be54e7e21b85644ea9b6127984 /libavformat/apngdec.c
parent0f0f84071659d68a5dd048e59a0af9d64980013c (diff)
lavf/apngdec: Return EOF for incomplete files.
Fixes ticket #7536.
Diffstat (limited to 'libavformat/apngdec.c')
-rw-r--r--libavformat/apngdec.c4
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)