aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/wtv.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-10-18 01:12:19 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-10-20 10:38:38 +0100
commit9fbc613f0df1628e7e78bca791fa8833846f8210 (patch)
treefcaa6927a5e6d18dd51b937a50f9aedb2c83ae6a /libavformat/wtv.c
parentd7f530b0d67fe3996dbfa990a47c865e0d1400a2 (diff)
downloadffmpeg-9fbc613f0df1628e7e78bca791fa8833846f8210.tar.gz
wtv: check seek_by_sector return value
CC: libav-stable@libav.org Bug-Id: CID 1198258
Diffstat (limited to 'libavformat/wtv.c')
-rw-r--r--libavformat/wtv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index c85f374499..a3f8c27388 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -972,7 +972,9 @@ static int read_header(AVFormatContext *s)
avio_skip(s->pb, 4);
root_sector = avio_rl32(s->pb);
- seek_by_sector(s->pb, root_sector, 0);
+ ret = seek_by_sector(s->pb, root_sector, 0);
+ if (ret < 0)
+ return ret;
root_size = avio_read(s->pb, root, root_size);
if (root_size < 0)
return AVERROR_INVALIDDATA;