avformat/apngdec: Check fcTL chunk length when reading header

Reading the header terminates when an fcTL chunk is encountered in which
case read_header returned success without checking the length of said
chunk. Yet when read_packet processes this chunk, it checks for the
length to be 26 and errors out otherwise. So do so when reading the header,
too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-10-31 14:07:27 +01:00
parent 9c341c6c92
commit d9363b56a6
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ static int apng_read_header(AVFormatContext *s)
ctx->num_frames, ctx->num_play);
break;
case MKTAG('f', 'c', 'T', 'L'):
if (!acTL_found) {
if (!acTL_found || len != 26) {
ret = AVERROR_INVALIDDATA;
goto fail;
}