[vlc-devel] [PATCH 1/7] objects: add back legacy list node

Rémi Denis-Courmont remi at remlab.net
Mon May 27 17:00:11 CEST 2019


Le maanantaina 27. toukokuuta 2019, 17.45.10 EEST Thomas Guillem a écrit :
> This has been removed from c7e98fa75a88466b94b1bafae3bac3ba5f634537 as a
> side effect.

The object tree served exaxtly one purpose: to find other objects. We don't do 
that anymore because it's intrinsically racy and led to unfixable bugs in RC 
and LibVLC filters.

And this has nothing to do with finding the name of a module, which you can do 
with module_get_name() as always.

> @@ -196,11 +212,13 @@ size_t vlc_list_children(vlc_object_t *obj,
> vlc_object_t **restrict tab, vlc_object_internals_t *priv;
>      size_t count = 0;
> 
> +    vlc_mutex_lock(&tree_lock);
>      vlc_children_foreach(priv, vlc_internals(obj))
>      {
>           if (count < max)
>               tab[count] = vlc_object_hold(vlc_externals(priv));
>           count++;
>      }
> +    vlc_mutex_unlock(&tree_lock);
>      return count;

Use after free here.

Nack.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list