summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-17update ".so" links, and fix a special case for "const char *" in parsing ↵Thomas E. Dickey11-25/+42
function-names Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17document the cursor-load functionsThomas E. Dickey1-6/+55
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17add see-also sectionThomas E. Dickey1-4/+14
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17document the library-attributesThomas E. Dickey1-1/+28
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17document the theme_core setter/getter functionsThomas E. Dickey1-3/+16
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17improve explanation for functions which load imagesThomas E. Dickey1-6/+29
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17italicize parameter names, for readabilityThomas E. Dickey1-79/+85
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17correct a prototypeThomas E. Dickey1-1/+1
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17further formatting fixes. added script to create/find ".so" files which are ↵Thomas E. Dickey10-37/+238
missing Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17make the function-prototypes easier to read, by eliminating hyphenation and ↵Thomas E. Dickey1-24/+29
filling Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-17document the other environment variablesThomas E. Dickey1-2/+96
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11amend that...Thomas E. Dickey1-1/+1
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11add check in case the image size is 0x0Thomas E. Dickey1-1/+1
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11fix stricter gcc warnings using castsThomas E. Dickey1-11/+11
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11fix stricter gcc warnings using castsThomas E. Dickey1-1/+1
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11fix stricter gcc warnings by changing the type for the loop variable toThomas E. Dickey1-11/+11
match the type of the loop limit Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11quiet warnings for unused parametersThomas E. Dickey2-0/+6
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11fix a missing initializerThomas E. Dickey1-2/+4
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-03-11quiet normal gcc warnings using casts (no object change)Thomas E. Dickey5-59/+64
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2020-08-30Fix undefined behaviorValentin1-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.
2020-08-30Use fixed size integer typeValentin1-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.
2019-03-10libXcursor 1.2.0libXcursor-1.2.0Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-07Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-19Update README for gitlab migrationAlan Coopersmith3-25/+20
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-09Support XDG user data dir locationCosimo Cecchi2-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.
2018-03-23Fix crash when encountering cursor themes with circular dependencies.Philipp Ludwig1-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>
2017-11-25libXcursor 1.1.15libXcursor-1.1.15Matthieu Herrb1-1/+1
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-11-25Fix heap overflows when parsing malicious files. (CVE-2017-16612)Tobias Stoeckmann1-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>
2017-01-26autogen: add default patch prefixMihail Konev1-0/+3
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov1-4/+4
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-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer1-1/+1
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>
2015-06-05Insufficient memory for terminating null of string in _XcursorThemeInheritsshubham shrivastav1-1/+1
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>
2014-10-18Fix some clang integer sign/size mismatch warningsAlan Coopersmith2-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-10-18Use strdup() instead of malloc(strlen())+strcpy()Alan Coopersmith3-15/+8
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-04autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith1-1/+3
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-04configure: Drop AM_MAINTAINER_MODEAlan Coopersmith2-2/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-29libXcursor 1.1.14libXcursor-1.1.14Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-26signedness bug & integer overflow in _XcursorFileHeaderCreate() [CVE-2013-2003]Alan Coopersmith1-1/+1
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-01-15Replace deprecated Automake INCLUDES variable with AM_CPPFLAGSAlan Coopersmith1-1/+1
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>
2012-03-07libXcursor 1.1.13libXcursor-1.1.13Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-30XcursorImageLoadCursor: return failure if _XcursorGetDisplayInfo failsAlan Coopersmith1-0/+3
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-30XcursorFileSaveImages: plug memory leak on invalid inputAlan Coopersmith1-2/+5
Error: Memory leak (CWE 401) Memory leak of pointer 'comments' allocated with XcursorCommentsCreate(0) at line 982 of src/file.c in function 'XcursorFileSaveImages'. 'comments' allocated at line 978 with XcursorCommentsCreate(0). comments leaks when comments != 0 at line 981. [ 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-09-25Add generated Xcursor.h to .gitignoreJon TURNEY1-0/+1
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tested-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-25Fix install of generated Xcursor.h when builddir != srcdirJon TURNEY1-1/+1
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tested-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-19Set Xcursor.h version numbers from configure.acAlan Coopersmith2-10/+20
Based on similar commit dac73a519816 to libXft Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-16Strip trailing whitespaceAlan Coopersmith10-123/+123
Performed with: find * -type f | xargs perl -i -p -e 's{\s+$}{\n}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-29libXcursor 1.1.12libXcursor-1.1.12Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-22Mark bitmasks as unsigned intsAlan Coopersmith1-2/+2
Clears Sun compiler warnings from shifting 8 bits by 24 bits: "cursor.c", line 215: warning: integer overflow detected: op "<<" "cursor.c", line 280: warning: integer overflow detected: op "<<" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-07Correct error handling in _XcursorAverageColorJeremy Huddleston1-2/+3
Previously it would either div-zero or get stuck in a loop until int overflow if called with a bad value. cursor.c:214:32: warning: Division by zero return (0xff << 24) | ((red/npixels) << 16) | ((green/npixels) << 8) | (blue/npixels); Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-01Free the FontInfo structure after loading the cursor from it.Chris Wilson1-0/+1
References: https://bugs.freedesktop.org/show_bug.cgi?id=2731 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>