[FFmpeg-devel] [PATCH] avformat/concatdec: avoid NULL dereference when failed to open file.

Michael Niedermayer michaelni at gmx.at
Thu Jan 29 14:32:01 CET 2015


On Thu, Jan 29, 2015 at 10:56:54AM +0100, Nicolas George wrote:
> Le decadi 10 pluviôse, an CCXXIII, Zhang Rui a écrit :
> > ---
> >  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) {
> 
> LGTM, thanks.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150129/6c014bb9/attachment.asc>


More information about the ffmpeg-devel mailing list