summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* If O_CLOEXEC is defined, add "e" to fopen modesHEADmasterAlan Coopersmith2023-03-254-10/+17
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOLAlan Coopersmith2023-03-041-2/+4
| | | | | | | | | | | | | | | | | AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008, so it's time to rely on it. Clears autoconf warnings: configure.ac:42: warning: The macro `AC_PROG_LIBTOOL' is obsolete. configure.ac:42: You should run autoupdate. aclocal.m4:3465: AC_PROG_LIBTOOL is expanded from... configure.ac:42: the top level libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith2023-02-091-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXcursor 1.2.1libXcursor-1.2.1Alan Coopersmith2022-04-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* gitlab CI: add a basic build testAlan Coopersmith2022-04-031-0/+98
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Build xz tarballs instead of bzip2Alan Coopersmith2022-04-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix spelling/wording issuesAlan Coopersmith2022-04-032-2/+2
| | | | | | | Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert COPYING from ISO-8859-1 to UTF-8Alan Coopersmith2022-04-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* more cppcheck-style fixesThomas E. Dickey2021-05-062-14/+12
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* cppcheck style-fixesThomas E. Dickey2021-05-054-11/+7
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* mention "Inherits=" listsThomas E. Dickey2021-05-051-32/+55
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix XcursorTheme loop regressionTobias Stoeckmann2021-05-041-13/+8
| | | | | | | | | | | | | | | | | | | | Handle themes with multiple inherit entries. Although the previous commit keeped track of inherited themes, it only handled multiple theme entries on the highest level. This fix unconditionally checks if the next upper level contains a line. If it does, it processes contained themes (i.e. the current theme had an inherited entry in its index file). If the upper level has no more themes, it goes down a level and processes the next theme there. If no next theme exists, it moves down another level and so on until it reaches level 0, i.e. the initially supplied theme. The lowest level (d = 0) is treated specially because we must not modify the supplied theme, which could happen when calling _XcursorNextPath. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* Handle more theme loop situationsTobias Stoeckmann2021-05-021-36/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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@stoeckmann.org>
* eliminate special escaping for "/*" which produces look-alike Unicode forThomas E. Dickey2021-03-191-14/+14
| | | | | | | newer groff (making select/paste useless), but is not necessary with groff, mandoc or Solaris 10 nroff. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix a typo and a style issueThomas E. Dickey2021-03-191-2/+2
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* update copyright noticeThomas E. Dickey2021-03-171-15/+16
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix raggedy prototypes and structure declarations using tabstops in ↵Thomas E. Dickey2021-03-171-287/+311
| | | | | | appropriate macros Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the API called from libX11Thomas E. Dickey2021-03-178-8/+105
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the cursor-comments functionsThomas E. Dickey2021-03-176-0/+41
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the animation support functionsThomas E. Dickey2021-03-175-39/+70
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* improve explanation of Xcursor's search algorithmThomas E. Dickey2021-03-171-35/+63
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* start on the animated cursors; fixup whitespaceThomas E. Dickey2021-03-173-45/+54
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* update ".so" links, and fix a special case for "const char *" in parsing ↵Thomas E. Dickey2021-03-1711-25/+42
| | | | | | function-names Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the cursor-load functionsThomas E. Dickey2021-03-171-6/+55
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* add see-also sectionThomas E. Dickey2021-03-171-4/+14
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the library-attributesThomas E. Dickey2021-03-171-1/+28
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the theme_core setter/getter functionsThomas E. Dickey2021-03-171-3/+16
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* improve explanation for functions which load imagesThomas E. Dickey2021-03-171-6/+29
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* italicize parameter names, for readabilityThomas E. Dickey2021-03-171-79/+85
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* correct a prototypeThomas E. Dickey2021-03-171-1/+1
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* further formatting fixes. added script to create/find ".so" files which are ↵Thomas E. Dickey2021-03-1710-37/+238
| | | | | | missing Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* make the function-prototypes easier to read, by eliminating hyphenation and ↵Thomas E. Dickey2021-03-171-24/+29
| | | | | | filling Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* document the other environment variablesThomas E. Dickey2021-03-171-2/+96
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* amend that...Thomas E. Dickey2021-03-111-1/+1
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* add check in case the image size is 0x0Thomas E. Dickey2021-03-111-1/+1
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix stricter gcc warnings using castsThomas E. Dickey2021-03-111-11/+11
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix stricter gcc warnings using castsThomas E. Dickey2021-03-111-1/+1
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix stricter gcc warnings by changing the type for the loop variable toThomas E. Dickey2021-03-111-11/+11
| | | | | | match the type of the loop limit Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* quiet warnings for unused parametersThomas E. Dickey2021-03-112-0/+6
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* fix a missing initializerThomas E. Dickey2021-03-111-2/+4
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* quiet normal gcc warnings using casts (no object change)Thomas E. Dickey2021-03-115-59/+64
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* Fix undefined behaviorValentin2020-08-301-5/+6
| | | | | | Without the casts the bytes accesses get converted to int. but int is not guaranteed to be 4 bytes large. Even when it is 4 bytes large `bytes[3] << 24` does not fit because int is signed.
* Use fixed size integer typeValentin2020-08-301-1/+2
| | | | | | This type is meant to be 4 bytes large as seen in _XcursorReadUInt which always reads 4 bytes. An unsigned int is often 4 bytes large but this isnt' guaranteed so it is cleaner to use the exact type we want.
* libXcursor 1.2.0libXcursor-1.2.0Alan Coopersmith2019-03-101-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Update configure.ac bug URL for gitlab migrationAlan Coopersmith2018-12-071-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Update README for gitlab migrationAlan Coopersmith2018-11-193-25/+20
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Support XDG user data dir locationCosimo Cecchi2018-11-092-2/+2
| | | | | | | | | | Nowadays ~/.icons is not used anymore as the preferred location for custom user icon themes; XDG_DATA_HOME/icons (aka ~/.local/share/icons) is what toolkits like GTK prefer. Prepend that location to the default xcursor path, so that cursor themes installed there can be used by apps and toolkits that use libXcursor.
* Fix crash when encountering cursor themes with circular dependencies.Philipp Ludwig2018-03-231-1/+6
| | | | | | | 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>
* libXcursor 1.1.15libXcursor-1.1.15Matthieu Herrb2017-11-251-1/+1
| | | | Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
* Fix heap overflows when parsing malicious files. (CVE-2017-16612)Tobias Stoeckmann2017-11-251-2/+10
| | | | | | | | | | | | | | | | | | | | It is possible to trigger heap overflows due to an integer overflow while parsing images and a signedness issue while parsing comments. The integer overflow occurs because the chosen limit 0x10000 for dimensions is too large for 32 bit systems, because each pixel takes 4 bytes. Properly chosen values allow an overflow which in turn will lead to less allocated memory than needed for subsequent reads. The signedness bug is triggered by reading the length of a comment as unsigned int, but casting it to int when calling the function XcursorCommentCreate. Turning length into a negative value allows the check against XCURSOR_COMMENT_MAX_LEN to pass, and the following addition of sizeof (XcursorComment) + 1 makes it possible to allocate less memory than needed for subsequent reads. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>