Commit 56ee5a9a authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Prevent NULL dereference when the palette is missing in the xan decoder.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5279141c
......@@ -552,6 +552,9 @@ static int xan_decode_frame(AVCodecContext *avctx,
}
buf_size = buf_end - buf;
}
if (s->palettes_count <= 0)
return AVERROR_INVALIDDATA;
if ((ret = avctx->get_buffer(avctx, &s->current_frame))) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
......
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