mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/pngdec: Require a IHDR chunk before fctl
This is required by the APNG spec Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit a1736926e9ae51706b537776722e816a4d1f6b36) Conflicts: libavcodec/pngdec.c
This commit is contained in:
parent
63ef4014c5
commit
873b08f411
@ -814,6 +814,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;
|
||||
}
|
||||
|
||||
sequence_number = bytestream2_get_be32(&s->gb);
|
||||
s->cur_w = bytestream2_get_be32(&s->gb);
|
||||
s->cur_h = bytestream2_get_be32(&s->gb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user