wayland/cursor
Chloé Vulquin 16aee2ec38 xcursor: catch theme inheritance loops
As of currently, when an xcursor theme depends on itself or another theme
that will eventually depend on it, `xcursor_load_theme` will recurse
infinitely while processing the inherits.

This change introduces a stack-allocated linked list of visited nodes
by name, and skips any already visited nodes in the inherit list.

Side effects:
* Since the linked list is stack-allocated, there is a potential for an
  overflow if there is a very long list of dependencies. If this turns out
  to be a legitimate concern, the linked list is trivial to convert to
  being heap-allocated.
* There is an existing linked list (technically doubly linked list)
  implementation in the wayland codebase. As of currently, the xcursor
  codebase does not refer to it. Consequently, this change writes a
  minimal single linked list implementation to utilize directly.

This changeset fixes #317.

Signed-off-by: Chloé Vulquin <toast@bunkerlabs.net>
2024-04-24 12:28:38 +02:00
..
convert_font.c cursor/convert_font.c: malloc cannot guarantee that the memory allocated is always successful 2020-10-29 13:00:20 +00:00
cursor-data.h cursor: add aliases for cursor name spec 2024-01-19 14:08:16 +00:00
cursor.pcf cursor: add cursor.pcf and extraction program 2012-09-10 21:05:14 -04:00
meson.build meson: override dependencies to ease use as subproject 2021-12-08 00:27:58 +01:00
os-compatibility.c cursor: memfd_create: try MFD_NOEXEC_SEAL 2024-04-21 19:17:46 +02:00
os-compatibility.h cursor/os-compatibility: move resizing into a separate function 2020-02-23 20:42:54 +00:00
wayland-cursor.c cursor: make param names match with documentation 2022-09-13 18:01:57 +00:00
wayland-cursor.h cursor: Properly document wl_cursor_image and wl_cursor 2020-06-05 11:05:20 +00:00
xcursor.c xcursor: catch theme inheritance loops 2024-04-24 12:28:38 +02:00
xcursor.h cursor: rename functions to snake case 2022-05-23 08:59:05 +00:00