avcodec/xan: Use av_realloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-19 17:12:09 +01:00
parent 6c702c3c63
commit 438c0a665a
1 changed files with 2 additions and 2 deletions

View File

@ -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;