Commit a1736926 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pngdec: Require a IHDR chunk before fctl

This is required by the APNG spec
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 47f4e2d8
......@@ -824,6 +824,11 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
if (length != 26)
return AVERROR_INVALIDDATA;
if (!(s->state & PNG_IHDR)) {
av_log(avctx, AV_LOG_ERROR, "fctl before IHDR\n");
return AVERROR_INVALIDDATA;
}
s->last_w = s->cur_w;
s->last_h = s->cur_h;
s->last_x_offset = s->x_offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment