Commit 01900fcc authored by Michael Niedermayer's avatar Michael Niedermayer

xan: fix out of array read

Fixes ticket1360
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1e5c7376
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment