Find a file
Tobias Stoeckmann b47ca9858e Handle more theme loop situations
This is a follow up for commit f64a8cc1a6
resulting from https://bugs.freedesktop.org/show_bug.cgi?id=3603

The current loop detection only works for direct self references but not
for transitive ones. Limiting the inheritance depth fixes this issue as
suggested by Keith Packard.

I avoided the introduction of a recursion function. Instead I modified
XcursorScanTheme to work iterative.

The current recursion code adds the "Inherits=..." line to heap and has
an iteration variable to go through all themes listed in that line per
recursion. This is covered with the newly introduced XcursorInherit
struct with its fields "line" and "theme". Since "theme" points into
"line", only "line" has to be freed eventually.

If a fixed inheritage limit of 32 is reached, the code stops processing
and returns NULL. It also returns NULL if it detects the initial theme
in one of the inheritages to break the loop early on.

Last but not least I removed the printf statement. The only situation in
which libXcursor writes to stdout is when it is explicitly requested.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2021-05-02 16:27:38 +02:00
include/X11/Xcursor Use fixed size integer type 2020-08-30 15:35:16 +02:00
man eliminate special escaping for "/*" which produces look-alike Unicode for 2021-03-19 17:16:15 -04:00
src Handle more theme loop situations 2021-05-02 16:27:38 +02:00
.gitignore Add generated Xcursor.h to .gitignore 2011-09-25 13:17:19 +01:00
AUTHORS - Add Xcursor build system 2005-06-08 19:15:43 +00:00
autogen.sh autogen: add default patch prefix 2017-01-26 13:52:49 +10:00
configure.ac libXcursor 1.2.0 2019-03-10 17:36:26 -07:00
COPYING - Add Xcursor build system 2005-06-08 19:15:43 +00:00
Makefile.am Update README for gitlab migration 2018-11-19 21:47:26 -08:00
README.md Update README for gitlab migration 2018-11-19 21:47:26 -08:00
xcursor.pc.in Added missing dependency 2006-09-12 09:02:54 -07:00

libXcursor - X Window System Cursor management library

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.x.org/mailman/listinfo/xorg

The master development code repository can be found at:

https://gitlab.freedesktop.org/xorg/lib/libXcursor

Please submit bug reports and requests to merge patches there.

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches