ffmpeg | branch: master | Zhang Rui <bbcal...@gmail.com> | Thu Jan 29 17:55:32 
2015 +0800| [038f3a173f59c9fc3396aa38e7972661da7ca504] | committer: Michael 
Niedermayer

avformat/concatdec: avoid NULL dereference when failed to open file.

Reviewed-by: Nicolas George <geo...@nsup.org>
Signed-off-by: Michael Niedermayer <michae...@gmx.at>

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

 libavformat/concatdec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index e109524..f07cfd7 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -482,6 +482,9 @@ static int concat_read_packet(AVFormatContext *avf, 
AVPacket *pkt)
     ConcatStream *cs;
     AVStream *st;
 
+    if (!cat->avf)
+        return AVERROR(EIO);
+
     while (1) {
         ret = av_read_frame(cat->avf, pkt);
         if (ret == AVERROR_EOF) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to