summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-02-13 20:46:08 +0100
committerAnton Khirnov <anton@khirnov.net>2013-02-23 09:13:08 +0100
commit8097fc9a2dd49d8e467b16c8bafaa96242b7fe46 (patch)
tree10ab8a94d2cd5d428fa42b24efdd53441e986584
parent311443f6c7eb230276e320f2d30a5d729cf32b76 (diff)
downloadffmpeg-streaming-8097fc9a2dd49d8e467b16c8bafaa96242b7fe46.zip
ffmpeg-streaming-8097fc9a2dd49d8e467b16c8bafaa96242b7fe46.tar.gz
4xm: check the return value of read_huffman_tables().
CC:libav-stable@libav.org
-rw-r--r--libavcodec/4xm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index fa5256c..82f8417 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);
OpenPOWER on IntegriCloud