summaryrefslogtreecommitdiff
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c4
1 files 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;