wtv: check seek_by_sector return value
authorVittorio Giovara <vittorio.giovara@gmail.com>
Sat, 18 Oct 2014 00:12:19 +0000 (01:12 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 20 Oct 2014 09:38:38 +0000 (10:38 +0100)
CC: libav-stable@libav.org
Bug-Id: CID 1198258

libavformat/wtv.c

index c85f374..a3f8c27 100644 (file)
@@ -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;