Commit graph

159 commits

Author SHA1 Message Date
Alan Coopersmith
81dc4a481b configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
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>
2023-03-04 14:50:53 -08:00
Alan Coopersmith
87a30b1758 gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 12:07:02 -08:00
Alan Coopersmith
27adb16027
libXcursor 1.2.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03 09:55:44 -07:00
Alan Coopersmith
e864ad8306 gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03 09:43:29 -07:00
Alan Coopersmith
f0d8a59186 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03 09:22:14 -07:00
Alan Coopersmith
d223fce4c7 Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03 09:21:29 -07:00
Alan Coopersmith
66accad188 Convert COPYING from ISO-8859-1 to UTF-8
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-03 09:19:14 -07:00
Thomas E. Dickey
801925839d
more cppcheck-style fixes
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-05-06 20:12:37 -04:00
Thomas E. Dickey
f807ac9c78
cppcheck style-fixes
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-05-05 20:25:26 -04:00
Thomas E. Dickey
13ca987eaf
mention "Inherits=" lists
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-05-05 20:18:31 -04:00
Tobias Stoeckmann
6edf1caf6f fix XcursorTheme loop regression
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>
2021-05-04 18:59:46 +02:00
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
Thomas E. Dickey
403bb32d5f
eliminate special escaping for "/*" which produces look-alike Unicode for
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>
2021-03-19 17:16:15 -04:00
Thomas E. Dickey
1ab5ffa9e3
fix a typo and a style issue
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-19 17:16:08 -04:00
Thomas E. Dickey
9898afadfb
update copyright notice
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:31 -04:00
Thomas E. Dickey
d64dda62de
fix raggedy prototypes and structure declarations using tabstops in appropriate macros
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:26 -04:00
Thomas E. Dickey
8560016436
document the API called from libX11
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:22 -04:00
Thomas E. Dickey
bacd41c0c0
document the cursor-comments functions
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:17 -04:00
Thomas E. Dickey
821254578e
document the animation support functions
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:13 -04:00
Thomas E. Dickey
2695829868
improve explanation of Xcursor's search algorithm
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:09 -04:00
Thomas E. Dickey
80cd802e0c
start on the animated cursors; fixup whitespace
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:05 -04:00
Thomas E. Dickey
36650c9455
update ".so" links, and fix a special case for "const char *" in parsing function-names
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:10:01 -04:00
Thomas E. Dickey
23a0faa129
document the cursor-load functions
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:56 -04:00
Thomas E. Dickey
5b15abee96
add see-also section
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:52 -04:00
Thomas E. Dickey
8ca8885d31
document the library-attributes
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:48 -04:00
Thomas E. Dickey
61adeda1d3
document the theme_core setter/getter functions
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:44 -04:00
Thomas E. Dickey
f5b6dc1af2
improve explanation for functions which load images
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:40 -04:00
Thomas E. Dickey
bd591012ed
italicize parameter names, for readability
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:35 -04:00
Thomas E. Dickey
438e798b34
correct a prototype
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:30 -04:00
Thomas E. Dickey
a383f6cc5d
further formatting fixes. added script to create/find ".so" files which are missing
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:25 -04:00
Thomas E. Dickey
1fd32263c0
make the function-prototypes easier to read, by eliminating hyphenation and filling
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:21 -04:00
Thomas E. Dickey
979809b752
document the other environment variables
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17 19:09:16 -04:00
Thomas E. Dickey
fb377b9a71
amend that...
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:40 -05:00
Thomas E. Dickey
362fdcfc3e
add check in case the image size is 0x0
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:34 -05:00
Thomas E. Dickey
09f69a8829
fix stricter gcc warnings using casts
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:29 -05:00
Thomas E. Dickey
152f8e45db
fix stricter gcc warnings using casts
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:22 -05:00
Thomas E. Dickey
628cde0575
fix stricter gcc warnings by changing the type for the loop variable to
match the type of the loop limit

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:15 -05:00
Thomas E. Dickey
ce907e36e0
quiet warnings for unused parameters
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:09 -05:00
Thomas E. Dickey
7623dae73c
fix a missing initializer
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:25:03 -05:00
Thomas E. Dickey
cea72e1427
quiet normal gcc warnings using casts (no object change)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11 20:24:54 -05:00
Valentin
204b6f1308 Fix undefined behavior
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.
2020-08-30 15:37:19 +02:00
Valentin
448398a3b9 Use fixed size integer type
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.
2020-08-30 15:35:16 +02:00
Alan Coopersmith
b84b5d100f
libXcursor 1.2.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-10 17:36:26 -07:00
Alan Coopersmith
8ff9605921 Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-07 19:41:07 -08:00
Alan Coopersmith
534456082e Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-19 21:47:26 -08:00
Cosimo Cecchi
2263c196cb Support XDG user data dir location
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.
2018-11-09 20:06:41 -08:00
Philipp Ludwig
f64a8cc1a6 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>
2018-03-23 23:22:22 -07:00
Matthieu Herrb
4828abe494 libXcursor 1.1.15
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-11-25 11:59:31 +01:00
Tobias Stoeckmann
4794b5dd34 Fix heap overflows when parsing malicious files. (CVE-2017-16612)
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>
2017-11-25 11:52:34 +01:00
Mihail Konev
75b10c972d autogen: add default patch prefix
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26 13:52:49 +10:00