summaryrefslogtreecommitdiff
path: root/libavformat/wtvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-20 20:59:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-20 20:59:30 +0100
commit3317414fc11a9a187b474141f4ac13f895c0b493 (patch)
tree299c23f01db534a93923fdfafd7119d6b9446eb6 /libavformat/wtvdec.c
parent3fba3e79a3e46d7611817f9051b33885eb1ff962 (diff)
wtvdec: fix integer overflow
Fixes CID968583 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r--libavformat/wtvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 139d2a4f41..e423370a9b 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 */