[vlc-devel] Re: wxwidgets/playlist potential crash
Brian Robb
vascy at hotmail.com
Sat Sep 3 18:49:03 CEST 2005
In the modules/gui/wxwidgets/playlist.cpp file in the Playlist constructor
(about line 211):
pp_sds needs a default value of NULL...
So add:
pp_sds = NULL;
Before the following:
p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
...
So that if vlc_object_find fails pp_sds has a default value.
The potential crash is when the deconstructor is ran:
Playlist::~Playlist()
{
if( pp_sds != NULL ) {
free( pp_sds );
pp_sds = NULL;
}
if( p_playlist == NULL )
{
return;
}
...
}
if pp_sds isn't given a default value of NULL,
then you could be freeing an uninitialized pointer with the line: free(
pp_sds );
:)
I could only get this to crash on the version of vlc that I built,
but it's still a potential crash in the offical version.
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list