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;
|
return AVERROR_INVALIDDATA;
|
||||||
if (s->palettes_count >= PALETTES_MAX)
|
if (s->palettes_count >= PALETTES_MAX)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
tmpptr = av_realloc(s->palettes,
|
tmpptr = av_realloc_array(s->palettes,
|
||||||
(s->palettes_count + 1) * AVPALETTE_SIZE);
|
s->palettes_count + 1, AVPALETTE_SIZE);
|
||||||
if (!tmpptr)
|
if (!tmpptr)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
s->palettes = tmpptr;
|
s->palettes = tmpptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user