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

Francois Cartegnie fcvlcdev at free.fr
Thu Jul 19 22:04:15 CEST 2012


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.

Francois




More information about the vlc-devel mailing list