[FFmpeg-cvslog] avformat/utils: add missing brackets around arguments in av_realloc() call

James Almer git at videolan.org
Tue Nov 22 04:05:11 EET 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Nov 21 23:01:48 2016 -0300| [0b8df0ce48e6e3d3263f20ec0ce20fe72bdae318] | committer: James Almer

avformat/utils: add missing brackets around arguments in av_realloc() call

Found-by: Neil Birkbeck <neil.birkbeck at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 9d01bab..2634317 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -5124,7 +5124,7 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
     if ((unsigned)st->nb_side_data + 1 >= INT_MAX / sizeof(*st->side_data))
         return AVERROR(ERANGE);
 
-    tmp = av_realloc(st->side_data, st->nb_side_data + 1 * sizeof(*tmp));
+    tmp = av_realloc(st->side_data, (st->nb_side_data + 1) * sizeof(*tmp));
     if (!tmp) {
         return AVERROR(ENOMEM);
     }



More information about the ffmpeg-cvslog mailing list