summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOLHEADmasterAlan Coopersmith2023-03-041-2/+2
| | | | | | | | | | | | | | 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:19: warning: The macro `AC_PROG_LIBTOOL' is obsolete. configure.ac:19: You should run autoupdate. m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from... configure.ac:19: the top level Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* configure: raise minimum autoconf requirement to 2.70Alan Coopersmith2023-02-162-5/+6
| | | | | | | | Needed for builds on NetBSD to work correctly, since it depends on AC_USE_SYSTEM_EXTENSIONS defining _OPENBSD_SOURCE to expose the prototype for reallocarray() in the system headers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Wrap Xext*CheckExtension() in do { ... } while(0)Alan Coopersmith2022-11-201-4/+6
| | | | | | | Makes macro expansion safer and eliminates -Wextra-semi-stmt warnings from clang every time it is called due to semicolon after bracket. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXext 1.3.5libXext-1.3.5Alan Coopersmith2022-10-281-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* COPYING: Add info for Xge.* and reallocarray.* filesAlan Coopersmith2022-10-171-1/+16
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove "All rights reserved" from Oracle copyright notices.Alan Coopersmith2022-10-1715-15/+14
| | | | | | Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* configure: Use AC_USE_SYSTEM_EXTENSIONS to set GNU_SOURCE & other definesAlan Coopersmith2022-07-171-0/+5
| | | | | | Fixes: #4 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert calls to Xmalloc arrays to use Xmallocarray insteadAlan Coopersmith2022-06-113-4/+7
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Import reallocarray() from libX11Alan Coopersmith2022-06-114-2/+91
| | | | | | Originally from OpenBSD, based on libx11@bcf7b5aa Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use calloc instead of malloc if we may not initialize all the bytesAlan Coopersmith2022-06-105-6/+6
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary (char *) casts from Xfree() argumentsAlan Coopersmith2022-06-105-12/+12
| | | | | | These also haven't been needed since C89 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary casts of malloc/calloc resultsAlan Coopersmith2022-06-108-15/+13
| | | | | | | These aren't needed in C89 and later, but can hide missing prototypes that generate broken code on platforms where pointers are larger than ints. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add extutilP.h header for xgeExtRegister() prototypeAlan Coopersmith2022-06-104-3/+50
| | | | | | | | | | | Clears gcc warning: Xge.c:302:11: warning: no previous prototype for ‘xgeExtRegister’ [-Wmissing-prototypes] _X_HIDDEN xgeExtRegister(Display* dpy, int offset, XExtensionHooks* callbacks) ^~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Xge.c, Xge.h: convert from ISO-8859-1 to UTF-8Alan Coopersmith2022-06-102-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* gitlab CI: add a basic build testAlan Coopersmith2022-06-101-0/+99
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix spelling/wording issuesAlan Coopersmith2022-06-1015-18/+18
| | | | | | | Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Build xz tarballs instead of bzip2Alan Coopersmith2022-06-101-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* add ACLOCAL_AMFLAGS = -I m4 to make aclocal pick ax_gcc_builtin.m4Matthieu Herrb2019-08-031-0/+2
| | | | | | Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXext 1.3.4libXext-1.3.4Alan Coopersmith2019-03-161-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add description of libXext to README.mdAlan Coopersmith2019-03-161-0/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Update configure.ac bug URL for gitlab migrationAlan Coopersmith2019-03-161-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Update README for gitlab migrationAlan Coopersmith2018-11-193-29/+24
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen: add default patch prefixMihail Konev2017-01-261-0/+3
| | | | Signed-off-by: Mihail Konev <k.mvc@ya.ru>
* autogen.sh: use quoted string variablesEmil Velikov2017-01-261-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>
* autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer2017-01-261-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>
* Use __builtin_popcountl if available to replace Ones() in XSecurity.cAlan Coopersmith2016-03-033-2/+182
| | | | | | | | | | | | | | | If the compiler knows of a better algorithm for counting the number of bits set in a word for the target CPU, let it use that, instead of the classic algorithm optimized for PDP-6. Tested for the range of values used in XSecurity.c and verified results are the same from both: for (unsigned long i = 0; i <= XSecurityAllAuthorizationAttributes; i++) { printf("ones: %d\tpopcnt: %d\n", Ones(i), __builtin_popcountl(i)); } Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix typos in man pagesAlan Coopersmith2016-03-032-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Assert that values buffer has enough room for provided valuesAlan Coopersmith2016-03-031-0/+5
| | | | | | | | | | | Catch if anyone ever defines more types again and forgets to increase the size of the value buffer to match. v2: assert on the full set of possible values, regardless of which the current caller passed in this call - more likely to be spotted during testing, less likely to not be found until called in production. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* XSecurityGenerateAuthorization: Allocate enough space in values bufferRob Wu2016-03-031-1/+1
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=94292 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Seth Arnold <seth.arnold@canonical.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXext 1.3.3libXext-1.3.3Peter Hutterer2014-07-241-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Xge: remove warning messages about missing Xge extension event translationsKeith Packard2014-03-171-7/+0
| | | | | | | | | When mixing Xlib and xcb, it's quite possible for some events to be received for xcb-only extensions, which will subsequently not be translatable by the Xge WireToEvent/EventToWire hooks Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* XeviGetVisualInfo: Free & clear *evi_return, not evi_return pointerAlan Coopersmith2014-03-081-2/+4
| | | | | | | | | | | | | | | | evi_return is passed in as a pointer to a location into which XeviGetVisualInfo is expected to write a pointer to the memory it allocated for the returned structures. If we're failing and bailing out, we need to dispose of the pointer we set, not the one passed into us (which the caller may have put on the stack or allocated as part of a larger structure). Flagged by cppcheck 1.64: [lib/libXext/src/XEVI.c:182] -> [lib/libXext/src/XEVI.c:186]: (warning) Possible null pointer dereference: evi_return - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Stricter event error checkingNathan Kidd2014-01-201-11/+17
| | | | | | | | | | | | A malicious X server claiming to not support GE but sending a GE would SEGV the client (always a NULL derefrence). Possible since d1c93500. (Also guard the EventToWire case so it's harder to shoot yourself in the foot.) Signed-off-by: Nathan Kidd <nkidd@opentext.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove fallback for _XEatDataWords, require libX11 1.6 for itAlan Coopersmith2013-11-0710-55/+1
| | | | | | | | | | | | _XEatDataWords was orignally introduced with the May 2013 security patches, and in order to ease the process of delivering those, fallback versions of _XEatDataWords were included in the X extension library patches so they could be applied to older versions that didn't have libX11 1.6 yet. Now that we're past that hurdle, we can drop the fallbacks and just require libX11 1.6 for building new versions of the extension libraries. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Require ANSI C89 pre-processor, drop pre-C89 token pasting supportAlan Coopersmith2013-06-243-18/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Replace sprintf with snprintf when looking up extension error stringsAlan Coopersmith2013-06-222-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libXext 1.3.2libXext-1.3.2Alan Coopersmith2013-05-311-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XSyncListSystemCounters() [CVE-2013-1982 6/6]Alan Coopersmith2013-05-021-7/+25
| | | | | | | | | | | | | | If the number of counters or amount of data reported by the server is large enough that it overflows when multiplied by the size of the appropriate struct, then memory corruption can occur when more bytes are read from the X server than the size of the buffers we allocated to hold them. V2: Make sure we don't walk past the end of the reply when converting data from wire format to the structures returned to the caller. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XShapeGetRectangles() [CVE-2013-1982 5/6]Alan Coopersmith2013-05-021-10/+14
| | | | | | | | | | If the number of rectangles reported by the server is large enough that it overflows when multiplied by the size of the appropriate struct, then memory corruption can occur when more bytes are read from the X server than the size of the buffer we allocated to hold them. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XeviGetVisualInfo() [CVE-2013-1982 4/6]Alan Coopersmith2013-04-261-7/+18
| | | | | | | | | | If the number of visuals or conflicts reported by the server is large enough that it overflows when multiplied by the size of the appropriate struct, then memory corruption can occur when more bytes are read from the X server than the size of the buffer we allocated to hold them. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* several integer overflows in XdbeGetVisualInfo() [CVE-2013-1982 3/6]Alan Coopersmith2013-04-261-10/+17
| | | | | | | | | | If the number of screens or visuals reported by the server is large enough that it overflows when multiplied by the size of the appropriate struct, then memory corruption can occur when more bytes are read from the X server than the size of the buffer we allocated to hold them. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XcupStoreColors() [CVE-2013-1982 2/6]Alan Coopersmith2013-04-261-14/+11
| | | | | | | | | | | | | | If the computed number of entries is large enough that it overflows when multiplied by the size of a xColorItem struct, or is treated as negative when compared to the size of the stack allocated buffer, then memory corruption can occur when more bytes are read from the X server than the size of the buffer we allocated to hold them. The requirement to match the number of colors specified by the caller makes this much harder to hit than the one in XcupGetReservedColormapEntries() Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XcupGetReservedColormapEntries() [CVE-2013-1982 1/6]Alan Coopersmith2013-04-261-7/+12
| | | | | | | | | | | If the computed number of entries is large enough that it overflows when multiplied by the size of a xColorItem struct, or is treated as negative when compared to the size of the stack allocated buffer, then memory corruption can occur when more bytes are read from the X server than the size of the buffer we allocated to hold them. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use _XEatDataWords to avoid overflow of rep.length bit shiftingAlan Coopersmith2013-04-1310-9/+64
| | | | | | rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen.sh: Implement GNOME Build APIbaserock/morphColin Walters2013-01-151-1/+3
| | | | | | http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
* configure: Remove AM_MAINTAINER_MODEAdam Jackson2013-01-151-1/+0
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Replace presentationm-level requests with .RS/RE.Eric S. Raymond2012-08-231-9/+9
| | | | | | This will assist translation to DocBook. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Replace various unsafe presentation-level requests with .RS/.RE and .EX/EE.Eric S. Raymond2012-08-231-47/+68
| | | | These can be translated structurally into DocBook.
* Avoid having macros expand code to be: ((f) ? (f)->m1 : NULL)->m2Thomas Klausner2012-07-301-2/+2
| | | | | | | From Matthew R. Green <mrg@NetBSD.org> Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Destroy generic event extension after last display is removedChase Douglas2012-04-231-1/+9
| | | | | | | The extension record is currently leaked and never freed. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>