libXcursor: Changes to 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 4 00:12:54 UTC 2021


 src/library.c |  109 ++++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 73 insertions(+), 36 deletions(-)

New commits:
commit b47ca9858ee11bdbd08f1e31102116ff51cb6be5
Author: Tobias Stoeckmann <tobias at stoeckmann.org>
Date:   Sun May 2 16:00:25 2021 +0200

    Handle more theme loop situations
    
    This is a follow up for commit f64a8cc1a65dcad4294e2988b402a34175019663
    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 at stoeckmann.org>



More information about the xorg-commit mailing list