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>
This commit is contained in:
Philipp Ludwig 2017-01-22 14:21:54 +01:00 committed by Alan Coopersmith
parent 4828abe494
commit f64a8cc1a6

View file

@ -260,7 +260,12 @@ XcursorScanTheme (const char *theme, const char *name)
* Recurse to scan inherited themes * Recurse to scan inherited themes
*/ */
for (i = inherits; i && f == NULL; i = _XcursorNextPath (i)) for (i = inherits; i && f == NULL; i = _XcursorNextPath (i))
{
if (strcmp(i, theme) != 0)
f = XcursorScanTheme (i, name); f = XcursorScanTheme (i, name);
else
printf("Not calling XcursorScanTheme because of circular dependency: %s. %s", i, name);
}
if (inherits != NULL) if (inherits != NULL)
free (inherits); free (inherits);
return f; return f;