Commit 3317414f authored by Michael Niedermayer's avatar Michael Niedermayer

wtvdec: fix integer overflow

Fixes CID968583
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3fba3e79
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment