[FFmpeg-cvslog] avformat/vividas: check if viv->sb_pb is not NULL

Paul B Mahol git at videolan.org
Sat Dec 22 14:37:39 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Dec 22 13:36:36 2018 +0100| [d62cb29716a555728ab2679d2fe1a867addd8287] | committer: Paul B Mahol

avformat/vividas: check if viv->sb_pb is not NULL

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d62cb29716a555728ab2679d2fe1a867addd8287
---

 libavformat/vividas.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index ecbe47765c..e199b05d69 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -582,6 +582,8 @@ static int viv_read_packet(AVFormatContext *s,
     int64_t off;
     int ret;
 
+    if (!viv->sb_pb)
+        return AVERROR(EIO);
     if (avio_feof(viv->sb_pb))
         return AVERROR_EOF;
 
@@ -615,6 +617,8 @@ static int viv_read_packet(AVFormatContext *s,
     }
 
     pb = viv->sb_pb;
+    if (!pb)
+        return AVERROR(EIO);
     off = avio_tell(pb);
     off += viv->sb_entries[viv->current_sb_entry].size;
 



More information about the ffmpeg-cvslog mailing list