[vlc-devel] [PATCH] avcodec: fix double free on failure to open audio

Alex Converse alex.converse at gmail.com
Sun Feb 8 09:42:20 CET 2015


So it's freed in avcodec_free_context() its been freed there in all
versions of libav and ffmpeg that have that function. It's also freed in
the current version of VLC compat but not older versions.

See
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=a9ac943471c67fb3416f21246e389decda12cc38
for a the relevant compat change.
On Feb 8, 2015 12:18 AM, "Jean-Baptiste Kempf" <jb at videolan.org> wrote:

> On 07 Feb, Alex Converse wrote :
> > ---
> >  modules/codec/avcodec/audio.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/modules/codec/avcodec/audio.c
> b/modules/codec/avcodec/audio.c
> > index a37f1cf..514f76d 100644
> > --- a/modules/codec/avcodec/audio.c
> > +++ b/modules/codec/avcodec/audio.c
> > @@ -261,7 +261,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext
> *p_context,
> >      /* ***** Open the codec ***** */
> >      if( OpenAudioCodec( p_dec ) < 0 )
> >      {
> > -        av_free( p_context->extradata );
> >          free( p_sys );
> >          return VLC_EGENERIC;
> >      }
>
> I have a hard time seeing where the extradata is, in fact, freed.
>
> And I guess we have the same issue with subtitle part.
>
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150208/ede5a04b/attachment.html>


More information about the vlc-devel mailing list