ffmpeg | branch: release/2.5 | Michael Niedermayer <[email protected]> | Mon Jun 29 21:57:12 2015 +0200| [0628dfd99427037ddb535c6c0e248d192e678c7b] | committer: Michael Niedermayer
avcodec/pngdec: Require a IHDR chunk before fctl This is required by the APNG spec Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit a1736926e9ae51706b537776722e816a4d1f6b36) Conflicts: libavcodec/pngdec.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0628dfd99427037ddb535c6c0e248d192e678c7b --- libavcodec/pngdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 092528e..b60b2a0 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -813,6 +813,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); _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
