[vlc-devel] commit: Avoid segfault in subtitle demuxer. ( Rémi Duraffort )

Rémi Duraffort ivoire at via.ecp.fr
Wed Jul 2 22:29:50 CEST 2008


Le mercredi 02 juillet 2008 à 09:08:09, Antoine Cellerier a écrit :
> On Wed, Jul 02, 2008, git version control wrote:
> >      psz_type = var_CreateGetString( p_demux, "sub-type" );
> > -    if( *psz_type )
> > +    if( psz_type && *psz_type )
> 
> I though that var_GetString always returned a string which is why we had
> var_GetNonEmptyString. Has that behavior changed recently?
As far as I understand the way these functions work : in case of a
memory allocation error it will return a NULL.
And yes it normally can't occure so I don't what to do : do we have to
test for a NULL in case of a memory error ?

-- 
ivoire | Rémi Duraffort



More information about the vlc-devel mailing list