[FFmpeg-cvslog] lavf/subviewerdec: fix potential timing overflows.

Clément Bœsch git at videolan.org
Sun Oct 21 01:02:47 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Oct 21 01:08:17 2012 +0200| [1ea3c03743ec6a7c33312896de3bbdbe7f60d0f5] | committer: Clément Bœsch

lavf/subviewerdec: fix potential timing overflows.

Should fix CID733779 and CID733780.

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

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

diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index e708a28..99e40fd 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -57,8 +57,8 @@ static int read_ts(const char *s, int64_t *start, int *duration)
 
     if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u",
                &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
-        end    = (hh2*3600 + mm2*60 + ss2) * 100 + ms2;
-        *start = (hh1*3600 + mm1*60 + ss1) * 100 + ms1;
+        end    = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
+        *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
         *duration = end - *start;
         return 0;
     }



More information about the ffmpeg-cvslog mailing list