aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-02-13 20:46:08 +0100
committerReinhard Tartler <siretart@tauware.de>2013-02-23 14:41:24 +0100
commitbb3f1cad171b31537b64a9d19cabdbff50aca260 (patch)
tree158d971d4a919d19d9fc68482288f29f54930b53
parenta6403a3b69174363bff5edc85314f6d3fbba1ba1 (diff)
downloadffmpeg-bb3f1cad171b31537b64a9d19cabdbff50aca260.tar.gz
4xm: check the return value of read_huffman_tables().
CC:libav-stable@libav.org (cherry picked from commit 8097fc9a2dd49d8e467b16c8bafaa96242b7fe46) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavcodec/4xm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index fb03b7e1ba..987285a682 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -720,6 +720,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);