mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
9c341c6c92
commit
d9363b56a6
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue