mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/xan: Use av_realloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6c702c3c63
commit
438c0a665a
@ -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…
Reference in New Issue
Block a user