[FFmpeg-cvslog] avformat/utils: Check size argument in ff_add_index_entry()
Michael Niedermayer
git at videolan.org
Thu Oct 24 13:11:07 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 24 02:29:50 2013 +0200| [210afae0ba651a4f11468449989c6334bb856268] | committer: Michael Niedermayer
avformat/utils: Check size argument in ff_add_index_entry()
Fixes infinite loop
Fixes Ticket3061
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=210afae0ba651a4f11468449989c6334bb856268
---
libavformat/utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1c036aa..ed307ee 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1627,6 +1627,9 @@ int ff_add_index_entry(AVIndexEntry **index_entries,
if(timestamp == AV_NOPTS_VALUE)
return AVERROR(EINVAL);
+ if (size < 0 || size > 0x3FFFFFFF)
+ return AVERROR(EINVAL);
+
if (is_relative(timestamp)) //FIXME this maintains previous behavior but we should shift by the correct offset once known
timestamp -= RELATIVE_TS_BASE;
More information about the ffmpeg-cvslog
mailing list