[FFmpeg-cvslog] avcodec/xan: Use av_realloc_array()

Michael Niedermayer git at videolan.org
Mon Jan 19 18:43:07 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 19 17:12:09 2015 +0100| [438c0a665af3a368b49011d5ec109d9031090dfc] | committer: Michael Niedermayer

avcodec/xan: Use av_realloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=438c0a665af3a368b49011d5ec109d9031090dfc
---

 libavcodec/xan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 968464c..2c565ee 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;



More information about the ffmpeg-cvslog mailing list