Commit graph

13 commits

Author SHA1 Message Date
Alan Coopersmith
bf3501e039 Remove unnecessary casts of pointers to (char *) in calls to Xfree()
Left one cast behind that is necessary to change from const char *
to char * in src/xlibi18n/lcCharSet.c.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
3292195a64 XSetModifierMapping: Use Data instead of GetReqExtra
Handle arbitrary length data in the same fashion as other calls,
avoiding need to ensure it fits all in the request buffer.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-23 22:14:05 -07:00
Kees Cook
feb131b18a libX11: check "req" when calling GetReqExtra
This fixes the two callers of GetReqExtra to check that "req" is non-NULL
to avoid crashing now that GetReqExtra does internal bounds-checking on
the resulting buffer sizes.

Additionally updates comment describing return values to use names
instead of only literal values.

Signed-off-by: Kees Cook <kees@outflux.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-22 23:51:48 -07:00
Thomas Klausner
24d3ee0d08 Tighten out-of-range comparisons.
[For all of these, LONG_MAX was the correct value to prevent overflows
 for the recent CVEs.   Lowering to INT_MAX catches buggy replies from
 the server that 32-bit clients would reject but 64-bit would accept,
 so we catch bugs sooner, and really, no sane & working server should
 ever report more than 2gb of extension names, font path entries,
 key modifier maps, etc.  -alan- ]

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-21 13:06:43 -07:00
Alan Coopersmith
d38527e25f Remove more unnecessary casts from Xmalloc/calloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-09 18:59:54 -07:00
Alan Coopersmith
0b0f5d4358 integer overflow in XGetModifierMapping() [CVE-2013-1981 13/13]
Ensure that we don't underallocate when the server claims a very large reply

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-05-09 18:59:53 -07:00
Fernando Carrijo
6de368c9aa Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-07 15:12:34 -07:00
Alan Coopersmith
ddb1786720 Purge CVS/RCS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 17:38:26 -08:00
Alan Coopersmith
cf49e53701 Strip whitespace from end of lines in source files 2008-06-17 14:41:17 -07:00
Magnus Kessler
a48386ce6b Switched function definitions from K&R to ANSI style. 2007-05-01 15:20:08 +02:00
Søren Sandmann Pedersen
7eee605e3a - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in <X11/...>
- For Xcomposite and Xdamage, don't link the build system out of the xc tree
- Link the public X11 headers into their own directory
- Add links to XKeysymDB and XErrorDB
- Add links to all the Xlib man pages
- Add links to the lcUniConv subdirectory
- Conditionally include config.h in Xlib source
2005-05-13 22:53:36 +00:00
Egbert Eich
c6349f4319 Merging XORG-CURRENT into trunk 2004-04-23 18:42:09 +00:00
Kaleb Keithley
deae12c6b6 R6.6 is the Xorg base-line 2003-11-14 15:54:30 +00:00