aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-24 12:22:51 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-24 12:22:51 +0100
commit4ba35194a9d79b80a606aafe8744d82de5b4bcf4 (patch)
treede96700a80c207195a640fd4f7a60e4aafcdc60e /libavcodec/4xm.c
parentccc7bcc4fcaab51abfc618a8d74fb1e7f07005f1 (diff)
parentf935aca44c674d30e3ed940ef73bbad1228a5855 (diff)
downloadffmpeg-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.c6
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);