[FFmpeg-cvslog] wtvdec: fix integer overflow

Michael Niedermayer git at videolan.org
Sun Jan 20 21:06:35 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 20 20:59:30 2013 +0100| [3317414fc11a9a187b474141f4ac13f895c0b493] | committer: Michael Niedermayer

wtvdec: fix integer overflow

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

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

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

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 139d2a4..e423370 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -200,7 +200,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
         return NULL;
     }
 
-    if (wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS > avio_tell(s->pb))
+    if ((int64_t)wf->sectors[wf->nb_sectors - 1] << WTV_SECTOR_BITS > avio_tell(s->pb))
         av_log(s, AV_LOG_WARNING, "truncated file\n");
 
     /* check length */



More information about the ffmpeg-cvslog mailing list