X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fanm.c;h=3727534729d953c7e4d5af6a6e93d2eaf0d0bae4;hb=refs%2Ftags%2Fdebian%2F2.5.0_trusty1.1;hp=79a87dde99e8a8d47e5719e5584277bdb7d89002;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00;p=deb_ffmpeg.git diff --git a/ffmpeg/libavcodec/anm.c b/ffmpeg/libavcodec/anm.c index 79a87dd..3727534 100644 --- a/ffmpeg/libavcodec/anm.c +++ b/ffmpeg/libavcodec/anm.c @@ -47,8 +47,10 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size); - if (bytestream2_get_bytes_left(&s->gb) < 16 * 8 + 4 * 256) + if (bytestream2_get_bytes_left(&s->gb) < 16 * 8 + 4 * 256) { + av_frame_free(&s->frame); return AVERROR_INVALIDDATA; + } bytestream2_skipu(&s->gb, 16 * 8); for (i = 0; i < 256; i++)