From: Anton Khirnov Date: Wed, 13 Feb 2013 19:46:08 +0000 (+0100) Subject: 4xm: check the return value of read_huffman_tables(). X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8097fc9a2dd49d8e467b16c8bafaa96242b7fe46;p=ffmpeg 4xm: check the return value of read_huffman_tables(). CC:libav-stable@libav.org --- diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index fa5256c9ecd..82f8417f0e1 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -721,6 +721,10 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length) } prestream = read_huffman_tables(f, prestream); + if (!prestream) { + av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n"); + return AVERROR_INVALIDDATA; + } init_get_bits(&f->gb, buf + 4, 8 * bitstream_size);