summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Ludwig <git-devel@philippludwig.net>2017-01-22 14:21:54 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-03-23 23:22:22 -0700
commitf64a8cc1a65dcad4294e2988b402a34175019663 (patch)
tree88129c7f164f116723f9b855d856057945eecde7 /src
parent4828abe494df8fb4aa00dcaa22a03446ba418d01 (diff)
Fix crash when encountering cursor themes with circular dependencies.
https://bugs.freedesktop.org/show_bug.cgi?id=3603 Signed-off-by: Philipp Ludwig <git-devel@philippludwig.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r--src/library.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library.c b/src/library.c
index fd040ce..c6062f7 100644
--- a/src/library.c
+++ b/src/library.c
@@ -260,7 +260,12 @@ XcursorScanTheme (const char *theme, const char *name)
* Recurse to scan inherited themes
*/
for (i = inherits; i && f == NULL; i = _XcursorNextPath (i))
- f = XcursorScanTheme (i, name);
+ {
+ if (strcmp(i, theme) != 0)
+ f = XcursorScanTheme (i, name);
+ else
+ printf("Not calling XcursorScanTheme because of circular dependency: %s. %s", i, name);
+ }
if (inherits != NULL)
free (inherits);
return f;