diff options
author | Peter Ross <pross@xvid.org> | 2012-12-18 00:42:13 +1100 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2012-12-19 00:18:17 +1100 |
commit | 95015634f5017897a61f4883bc217b0f7efbc40c (patch) | |
tree | bb7905f2aa26489cb15edd7148db384bcc271a5a /libavformat/wtvdec.c | |
parent | ebfb738fa4b0dcefb14586be5d1dc0b44c91d6c2 (diff) | |
download | ffmpeg-95015634f5017897a61f4883bc217b0f7efbc40c.tar.gz |
wtv: permit root table and first sectors to be located beyond 2GB boundary
Fixes ticket #2025.
Signed-off-by: Peter Ross <pross@xvid.org>
Diffstat (limited to 'libavformat/wtvdec.c')
-rw-r--r-- | libavformat/wtvdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |