Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-28 19:04:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-28 19:26:17 +0400
commit7f8059bdfe9cdc00ccd8f8aa3bb0b4a32b6fb5bc (patch)
treef1085bf604b5d3f31b88e85c535aed77e3880817 /libavcodec
parent0f9098cb187dd080f4aa58d608de1515dca95134 (diff)
xan: fix out of array read
Fixes ticket1360 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 01900fcc45e99ee4556e0a5d87ff57b2f150dad4) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/xan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 155dee9595..b39290aedf 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -517,6 +517,10 @@ static int xan_decode_frame(AVCodecContext *avctx,
int i;
tag = bytestream_get_le32(&buf);
size = bytestream_get_be32(&buf);
+ if(size < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid tag size %d\n", size);
+ return AVERROR_INVALIDDATA;
+ }
size = FFMIN(size, buf_end - buf);
switch (tag) {
case PALT_TAG: