Commit graph

147 commits

Author SHA1 Message Date
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
Emil Velikov
721901fec3 autogen.sh: use quoted string variables
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
fall-outs, when they contain space.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26 11:59:25 +10:00
Peter Hutterer
860bda4cb1 autogen.sh: use exec instead of waiting for configure to finish
Syncs the invocation of configure with the one from the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-26 11:59:25 +10:00
shubham shrivastav
897213f36b Insufficient memory for terminating null of string in _XcursorThemeInherits
Fix does one byte of memory allocation for null termination of string.
https://bugs.freedesktop.org/show_bug.cgi?id=90857

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-06-05 13:36:22 -07:00
Alan Coopersmith
edf52212a0 Fix some clang integer sign/size mismatch warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-18 10:52:49 -07:00
Alan Coopersmith
bbf3c582c9 Use strdup() instead of malloc(strlen())+strcpy()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-18 10:24:13 -07:00
Alan Coopersmith
2e6bda49d0 autogen.sh: Honor NOCONFIGURE=1
See http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-04 18:04:51 -07:00
Alan Coopersmith
b1df53701f configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-04 18:04:51 -07:00
Alan Coopersmith
f92f118047 libXcursor 1.1.14
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-29 23:22:29 -07:00
Alan Coopersmith
8f677eaea0 signedness bug & integer overflow in _XcursorFileHeaderCreate() [CVE-2013-2003]
When parsing cursor files, a user defined (e.g. through environment
variables) cursor file is opened and parsed.

The header is read in _XcursorReadFileHeader(), which reads an unsigned
int for the number of toc structures in the header, but it was being
passed to _XcursorFileHeaderCreate() as a signed int to allocate those
structures.  If the number was negative, it would pass the bounds check
and could overflow the calculation for how much memory to allocate to
store the data being read, leading to overflowing the buffer with the
data read from the user controlled file.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-26 17:22:43 -07:00
Alan Coopersmith
1b98fd6a2e Replace deprecated Automake INCLUDES variable with AM_CPPFLAGS
Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html

  - Support for the long-deprecated INCLUDES variable will be removed
    altogether in Automake 1.14.  The AM_CPPFLAGS variable should be
    used instead.

This variable was deprecated in Automake releases prior to 1.10, which is
the current minimum level required to build X.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-15 18:51:39 -08:00
Alan Coopersmith
2a9eaf3305 libXcursor 1.1.13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-07 18:54:15 -08:00
Alan Coopersmith
8229cf75b3 XcursorImageLoadCursor: return failure if _XcursorGetDisplayInfo fails
Error: Null pointer dereference (CWE 476)
   Read from null pointer 'info'
        at line 615 of src/cursor.c in function 'XcursorImageLoadCursor'.
          Function '_XcursorGetDisplayInfo' may return constant 'NULL' at line 134, called at line 597.
          Null pointer introduced at line 134 of src/display.c in function '_XcursorGetDisplayInfo'.

[ This bug was found by the Parfait 0.3.7 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-30 18:59:43 -08:00