From 438c0a665af3a368b49011d5ec109d9031090dfc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 19 Jan 2015 17:12:09 +0100 Subject: avcodec/xan: Use av_realloc_array() Signed-off-by: Michael Niedermayer --- libavcodec/xan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 968464c65b..2c565eed0d 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -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; -- cgit v1.2.3