avcodec/xan: Use av_realloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/105/head
Michael Niedermayer 10 years ago
parent 6c702c3c63
commit 438c0a665a
  1. 4
      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;

Loading…
Cancel
Save