[vlc-devel] [vlc-commits] Qt: PLModel: fix string conversion for winxx

Rémi Denis-Courmont remi at remlab.net
Thu Jul 19 22:11:17 CEST 2012


Le jeudi 19 juillet 2012 23:04:15 Francois Cartegnie, vous avez écrit :
> Le 19/07/2012 14:59, Rémi Denis-Courmont a écrit :
> >>      if( ! uri.isEmpty() )
> >> 
> >> -        path = make_path( uri.toStdString().c_str() );
> >> +        path = make_path( uri.toAscii().constData() );
> > 
> > Are you sure the scope of the result of constData() is long enough? This
> > looks like use-after-free to me.
> 
> Well, as long as it's a c++ compiler, the temporary object holding the
> c_str array should be destroyed after the function returns.

"the" function? Which function?

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list