[vlc-devel] [PATCH 2/2] sout: description: make the ownership of es_format clear
Rémi Denis-Courmont
remi at remlab.net
Mon Oct 1 20:59:57 CEST 2018
Le maanantaina 1. lokakuuta 2018, 21.44.11 EEST Francois Cartegnie a écrit :
> Le 01/10/2018 à 13:11, Zhao Zhili a écrit :
> >> Only the NOTE is incorrect and the Del() must free the opaque, being
> >> here a fmt copy.
> >
> > Del() is called during input_Close(), but those es_format associated with
> > sout-description-data are used after input_Close(). So if there is a
> > single copy and Del() free those es_format, it leads to use-after-free.
> > If you think two copies are not right, any other suggestion?
> >
> > vlm.c:
> > var_Create( p_input, "sout-description-data",
> > VLC_VAR_ADDRESS );
> > var_SetAddress( p_input, "sout-description-data", &data );
> >
> > if( !input_Start( p_input ) )
> >
> > vlc_sem_wait( &sem_preparse );
> >
> > var_DelCallback( p_input, "intf-event",
> > InputEventPreparse,
> >
> > &preparse );
> >
> > input_Stop( p_input );
> > input_Close( p_input );
>
> Sounds like a hackish module :/
Yes, it's a horrible hack that only exists underneath the other horrible hack
known as the vod server module.
But it's always been like, and given how nobody cares about the VoD
functionality, it might not be worth fixing. (I'd rather bite the bullet and
remove altogether TBH.)
--
レミ・デニ-クールモン
http://www.remlab.net/
More information about the vlc-devel
mailing list