diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 12:22:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-24 12:22:51 +0100 |
commit | 4ba35194a9d79b80a606aafe8744d82de5b4bcf4 (patch) | |
tree | de96700a80c207195a640fd4f7a60e4aafcdc60e /libavcodec/4xm.c | |
parent | ccc7bcc4fcaab51abfc618a8d74fb1e7f07005f1 (diff) | |
parent | f935aca44c674d30e3ed940ef73bbad1228a5855 (diff) | |
download | ffmpeg-4ba35194a9d79b80a606aafe8744d82de5b4bcf4.tar.gz |
Merge commit 'f935aca44c674d30e3ed940ef73bbad1228a5855'
* commit 'f935aca44c674d30e3ed940ef73bbad1228a5855':
av_memcpy_backptr: avoid an infinite loop for back = 0
4xm: check the return value of read_huffman_tables().
Conflicts:
libavcodec/4xm.c
libavutil/mem.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r-- | libavcodec/4xm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 406ca728ad..e3d8486941 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -757,8 +757,10 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length) } prestream = read_huffman_tables(f, prestream, buf + length - prestream); - if (!prestream) - return -1; + if (!prestream) { + av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n"); + return AVERROR_INVALIDDATA; + } av_assert0(prestream <= buf + length); |