Commit 438c0a66 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/xan: Use av_realloc_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6c702c3c
......@@ -567,8 +567,8 @@ static int xan_decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
if (s->palettes_count >= PALETTES_MAX)
return AVERROR_INVALIDDATA;
tmpptr = av_realloc(s->palettes,
(s->palettes_count + 1) * AVPALETTE_SIZE);
tmpptr = av_realloc_array(s->palettes,
s->palettes_count + 1, AVPALETTE_SIZE);
if (!tmpptr)
return AVERROR(ENOMEM);
s->palettes = tmpptr;
......
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