Commit 9a31d3ab authored by Laurent Aimar's avatar Laurent Aimar

Fix unprotected access of input item (skins2).

parent c1986e20
...@@ -46,9 +46,10 @@ void CmdUpdateItem::execute() ...@@ -46,9 +46,10 @@ void CmdUpdateItem::execute()
// Get playlist item information // Get playlist item information
input_item_t *pItem = input_GetItem( p_input ); input_item_t *pItem = input_GetItem( p_input );
// XXX: we should not need to access p_input->psz_source directly, a char *pszName = input_item_GetName( pItem );
// getter should be provided by VLC core char *pszUri = input_item_GetURI( pItem );
string name = pItem->psz_name;
string name = pszName;
// XXX: This should be done in VLC core, not here... // XXX: This should be done in VLC core, not here...
// Remove path information if any // Remove path information if any
OSFactory *pFactory = OSFactory::instance( getIntf() ); OSFactory *pFactory = OSFactory::instance( getIntf() );
...@@ -58,7 +59,10 @@ void CmdUpdateItem::execute() ...@@ -58,7 +59,10 @@ void CmdUpdateItem::execute()
name = name.substr( pos + 1, name.size() - pos + 1 ); name = name.substr( pos + 1, name.size() - pos + 1 );
} }
UString srcName( getIntf(), name.c_str() ); UString srcName( getIntf(), name.c_str() );
UString srcURI( getIntf(), pItem->psz_uri ); UString srcURI( getIntf(), pszUri );
free( pszName );
free( pszUri );
// Create commands to update the stream variables // Create commands to update the stream variables
CmdSetText *pCmd1 = new CmdSetText( getIntf(), m_rStreamName, srcName ); CmdSetText *pCmd1 = new CmdSetText( getIntf(), m_rStreamName, srcName );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment