[vlc-devel] [patch] 2nd edition, crash in simple_preferences
Jean-Baptiste Kempf
jb at videolan.org
Wed Nov 28 08:39:50 CET 2007
Same as above with simple preferences...
On Tue, Nov 27, 2007, Andre Weber wrote :
>
> Index: simple_preferences.cpp
> ===================================================================
> --- simple_preferences.cpp (revision 23387)
> +++ simple_preferences.cpp (working copy)
> @@ -285,19 +285,23 @@
> /* Disk Devices */
> {
> ui.DVDDevice->setToolTip(
> - qtr( "If this propriety is blank, then you have\n"
> + qtr( "If this property is blank, then you have\n"
> "values for DVD, VCD, and CDDA.\n"
> - "You can define a unique one or set that in"
> + "You can define a unique one or set that in\n"
> "the advanced preferences" ) );
> char *psz_dvddiscpath = config_GetPsz( p_intf, "dvd" );
> char *psz_vcddiscpath = config_GetPsz( p_intf, "vcd" );
> char *psz_cddadiscpath = config_GetPsz( p_intf, "cd-audio" );
> - if( ( *psz_cddadiscpath == *psz_dvddiscpath )
> - && ( *psz_dvddiscpath == *psz_vcddiscpath ) )
> +
> + /* missing null checking produced crash on click... dvd was empty at my site */
> + if(psz_dvddiscpath && psz_cddadiscpath && psz_cddadiscpath &&
> + ( *psz_cddadiscpath == *psz_dvddiscpath ) &&
> + ( *psz_vcddiscpath == *psz_dvddiscpath ) )
> {
> ui.DVDDevice->setText( qfu( psz_dvddiscpath ) );
> }
> - delete psz_cddadiscpath; delete psz_dvddiscpath;
> + delete psz_cddadiscpath;
> + delete psz_dvddiscpath;
> delete psz_vcddiscpath;
> }
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
Best Regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/
More information about the vlc-devel
mailing list