Browse Source

lavf/apngdec: Return EOF for incomplete files.

Fixes ticket #7536.
tags/n4.2
Carl Eugen Hoyos 6 years ago
parent
commit
5ff080fdfa
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/apngdec.c

+ 4
- 0
libavformat/apngdec.c View File

@@ -342,6 +342,10 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)


len = avio_rb32(pb); len = avio_rb32(pb);
tag = avio_rl32(pb); tag = avio_rl32(pb);

if (avio_feof(pb))
return AVERROR_EOF;

switch (tag) { switch (tag) {
case MKTAG('f', 'c', 'T', 'L'): case MKTAG('f', 'c', 'T', 'L'):
if (len != 26) if (len != 26)


Loading…
Cancel
Save