Robert Bragg 6086f6c1d0 Xtranssock.c: avoid buffer overrun in SocketReopen
This function was constructing an address from a port string allocating
a buffer according to the size of the string but then later copying
the address according to sizeof(struct sockaddr).

This patch ensures that we allocate a struct sockaddr buffer with enough
space for the port string to be copied into sa_data[] and uses that
combined length to determine how much should be copied at the end of the
function.

This fixes a crash when using xwayland which uses ListenOnOpenFD() that
will call _XSERVTransReopenCOTSServer() with a short port string like
":1".

Signed-off-by: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-13 18:54:30 -08:00
2011-10-04 21:59:50 -06:00
2005-05-11 22:44:52 +00:00
2005-05-11 22:44:52 +00:00
2011-09-16 22:54:41 -07:00
2010-11-06 12:46:03 -07:00
2011-09-16 22:54:41 -07:00

xtrans is a library of code that is shared among various X packages to
handle network protocol transport in a modular fashion, allowing a
single place to add new transport types.  It is used by the X server,
libX11, libICE, the X font server, and related components.

It is however, *NOT* a shared library, but code which each consumer
includes and builds it's own copy of with various #ifdef flags to make
each copy slightly different.  To support this in the modular build
system, this package simply installs the C source files into
$(prefix)/include/X11/Xtrans and installs a pkg-config file and an
autoconf m4 macro file with the flags needed to use it.

Documentation of the xtrans API can be found in the included xtrans.xml
file in DocBook XML format. If 'xmlto' is installed, you can generate text,
html, postscript or pdf versions of the documentation by configuring
the build with --enable-docs, which is the default.

Please submit bugs & patches to the Xorg bugzilla:

	https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

under the component "Lib/xtrans".

All questions regarding this software should be directed at the
Xorg mailing list:

	http://lists.freedesktop.org/mailman/listinfo/xorg

The master development code repository can be found at:

	git://anongit.freedesktop.org/git/xorg/lib/libxtrans

	http://cgit.freedesktop.org/xorg/lib/libxtrans

For more information on the git code manager, see:

	http://wiki.x.org/wiki/GitPage
Description
No description provided
Readme 448 KiB
Languages
C 95.4%
M4 4.2%
Makefile 0.3%
Shell 0.1%