Commit 70174a13 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

playlist: Fix use after free

Nodes shouldn't be inserted in the playlist item array. ChangeToNode is
expected to remove it, but in case the item is created as a node, it
would still lay there, causing potential use after free.

Fix #19701
parent 581bd93a
......@@ -533,6 +533,7 @@ playlist_item_t * playlist_NodeAddInput( playlist_t *p_playlist,
if( unlikely(p_item == NULL) )
return NULL;
if( p_input->i_type != ITEM_TYPE_NODE )
ARRAY_APPEND(p_playlist->items, p_item);
playlist_NodeInsert( p_parent, p_item, i_pos );
......
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