[FFmpeg-cvslog] ff_gen_search: make step 64 bit to prevent hypothetical integer overflow

Michael Niedermayer git at videolan.org
Tue Jun 18 23:56:49 CEST 2013


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 18 20:47:07 2013 +0200| [04d69466003ff9496a8238d5d5e8714759662112] | committer: Carl Eugen Hoyos

ff_gen_search: make step 64 bit to prevent hypothetical integer overflow

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 9d73e302537144877ca9d5b648b21aca28b78f4f)

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7383cde..1ba9258 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1859,7 +1859,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts,
     }
 
     if(ts_max == AV_NOPTS_VALUE){
-        int step= 1024;
+        int64_t step= 1024;
         filesize = avio_size(s->pb);
         pos_max = filesize - 1;
         do{



More information about the ffmpeg-cvslog mailing list