[FFmpeg-cvslog] avformat/matroskadec: use av_realloc_array()

Michael Niedermayer git at videolan.org
Wed Sep 11 13:49:04 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 11 13:34:25 2013 +0200| [e5290823697d93f96cde6d59b3d66b1354696dee] | committer: Michael Niedermayer

avformat/matroskadec: use av_realloc_array()

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

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

 libavformat/matroskadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 50cb51b..a6cc7c9 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -950,7 +950,7 @@ static int ebml_parse_elem(MatroskaDemuxContext *matroska,
     data = (char *)data + syntax->data_offset;
     if (syntax->list_elem_size) {
         EbmlList *list = data;
-        newelem = av_realloc(list->elem, (list->nb_elem+1)*syntax->list_elem_size);
+        newelem = av_realloc_array(list->elem, list->nb_elem+1, syntax->list_elem_size);
         if (!newelem)
             return AVERROR(ENOMEM);
         list->elem = newelem;



More information about the ffmpeg-cvslog mailing list