From 95015634f5017897a61f4883bc217b0f7efbc40c Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Tue, 18 Dec 2012 00:42:13 +1100 Subject: wtv: permit root table and first sectors to be located beyond 2GB boundary Fixes ticket #2025. Signed-off-by: Peter Ross --- libavformat/wtvdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/wtvdec.c') diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c index 070614536c..ee80719332 100644 --- a/libavformat/wtvdec.c +++ b/libavformat/wtvdec.c @@ -149,7 +149,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int WtvFile *wf; uint8_t *buffer; - if (avio_seek(s->pb, first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0) + if (avio_seek(s->pb, (int64_t)first_sector << WTV_SECTOR_BITS, SEEK_SET) < 0) return NULL; wf = av_mallocz(sizeof(WtvFile)); @@ -922,7 +922,7 @@ static int read_header(AVFormatContext *s) avio_skip(s->pb, 4); root_sector = avio_rl32(s->pb); - avio_seek(s->pb, root_sector << WTV_SECTOR_BITS, SEEK_SET); + avio_seek(s->pb, (int64_t)root_sector << WTV_SECTOR_BITS, SEEK_SET); root_size = avio_read(s->pb, root, root_size); if (root_size < 0) return AVERROR_INVALIDDATA; -- cgit v1.2.3