diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-02-13 20:46:08 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-06-30 16:16:46 +0200 |
commit | e797b7787b258be7561939904442165510f381a6 (patch) | |
tree | f3e2f7dbddf4f8fc623a0ea08ce9f99c38dff7d9 /libavcodec | |
parent | 078e68d2617fcb339896ca68503a06f07cfdb41f (diff) | |
download | ffmpeg-e797b7787b258be7561939904442165510f381a6.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>
(cherry picked from commit bb3f1cad171b31537b64a9d19cabdbff50aca260)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/4xm.c
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/4xm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index c210e46e13..efaf939062 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -679,7 +679,11 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){ return -1; } - prestream= read_huffman_tables(f, prestream); + 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); |