Skip to content

wayland/subsurface: Check for circular relationships

Robert Mader requested to merge rmader/mutter:issue1521 into master

If a subsurface is equal to or an ancestor of the parent surface we currently crash. Check for that case and terminate the client.

Closes #1521 (closed)


For the record: I tested against the following crash reproducers:

wl_subcompositor_get_subsurface(subcompositor, subsurface1, subsurface2);
wl_subcompositor_get_subsurface(subcompositor, subsurface2, subsurface1);

and

wl_subcompositor_get_subsurface(subcompositor, subsurface1, subsurface2);
wl_subcompositor_get_subsurface(subcompositor, subsurface2, subsurface3);
wl_subcompositor_get_subsurface(subcompositor, subsurface3, subsurface1);

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1675402

Edited by Robert Mader

Merge request reports