mirror of
https://github.com/SwallowOS/xorg_lib_libxtrans
synced 2025-11-04 05:46:13 +08:00
6086f6c1d0e0a1c9e590879acb2319dea0eb6e96
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>
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
Languages
C
95.4%
M4
4.2%
Makefile
0.3%
Shell
0.1%