Prevent NULL dereference when the palette is missing in the xan decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 56ee5a9ad1b385129c40ba4773f99bc5943ae8af)
This commit is contained in:
parent
485b4317bb
commit
14617fa7b8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user