<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><br></div>
<div><br></div>
<div>On Tue, Aug 23, 2016, at 11:32, <a href="mailto:remi@remlab.net">remi@remlab.net</a> wrote:<br></div>
<blockquote type="cite"><p dir="ltr">Hello,<br></p><p dir="ltr"><div>Le 23 août 2016 15:45, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div>
<div> ><br></div>
<div> > This fixes a use-after-free when the art fetcher was triggering a callback<br></div>
<div> > registered by the playlist (that was destroyed).<br></div>
<div> ><br></div>
<div> > This partially reverts 17bd88b915188d1659ec46c07aa1efd3745071b5 that is a<br></div>
<div> > revert of 9e9b227443831d8c9798b78122a2194053f2b2f1.<br></div>
<div> ><br></div>
<div> > Fixes #17087<br></div>
<div> > ---<br></div>
<div> > src/libvlc.c | 11 ++++++++---<br></div>
<div> > 1 file changed, 8 insertions(+), 3 deletions(-)<br></div>
<div> ><br></div>
<div> > diff --git a/src/libvlc.c b/src/libvlc.c<br></div>
<div> > index 48c2b8c..8bd736c 100644<br></div>
<div> > --- a/src/libvlc.c<br></div>
<div> > +++ b/src/libvlc.c<br></div>
<div> > @@ -508,6 +508,14 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )<br></div>
<div> > {<br></div>
<div> >      libvlc_priv_t *priv = libvlc_priv (p_libvlc);<br></div>
<div> ><br></div>
<div> > +    /* Deactivate the playlist before deleting the preparser in order to<br></div>
<div> > +     * prevent new preparser requests from the playlist */<br></div>
<div> > +    if (priv->playlist)<br></div>
<div> > +        playlist_Deactivate(priv->playlist);<br></div>
<div> > +<br></div>
<div> > +    if (priv->parser != NULL)<br></div>
<div> > +        playlist_preparser_Delete(priv->parser);<br></div>
</p><p dir="ltr">I think we cannot assume that the preparser won't be used until all interfaces, VLM, Libvlc media players and playlist are all gone. And that seems unwarranted here.<br></p></blockquote><div><br></div>
<div>In that case we need to split it up into 1) deactivate playlist 2) destroy interfaces (but not the playlist) 3) delete the preparser 4) delete the playlist (idea from filip).<br></div>
<div><br></div>
<blockquote type="cite"><p dir="ltr"><div>> +<br></div>
<div> >      /* Ask the interfaces to stop and destroy them */<br></div>
<div> >      msg_Dbg( p_libvlc, "removing all interfaces" );<br></div>
<div> >      libvlc_Quit( p_libvlc );<br></div>
<div> > @@ -536,9 +544,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )<br></div>
<div> >      }<br></div>
<div> > #endif<br></div>
<div> ><br></div>
<div> > -    if (priv->parser != NULL)<br></div>
<div> > -        playlist_preparser_Delete(priv->parser);<br></div>
<div> > -<br></div>
<div> >      vlc_DeinitActions( p_libvlc, priv->actions );<br></div>
<div> ><br></div>
<div> >      /* Save the configuration */<br></div>
<div> > -- <br></div>
<div> > 2.8.1<br></div>
<div> ><br></div>
<div> > _______________________________________________<br></div>
<div> > vlc-devel mailing list<br></div>
<div> > To unsubscribe or modify your subscription options:<br></div>
<div> > https://mailman.videolan.org/listinfo/vlc-devel<br></div>
</p><div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>
</body>
</html>