From 0cb8ddb4414e268d56feeac09d9dc2e7b52adad6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 21 Feb 2015 15:40:48 +0100 Subject: update xorg-server-hwcursor-gamma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ...rver-Fix-a-crash-with-XDMCP-error-handler.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 xorg-server-hwcursor-gamma/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch (limited to 'xorg-server-hwcursor-gamma/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch') diff --git a/xorg-server-hwcursor-gamma/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch b/xorg-server-hwcursor-gamma/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch new file mode 100644 index 0000000..02dbaf2 --- /dev/null +++ b/xorg-server-hwcursor-gamma/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch @@ -0,0 +1,23 @@ +diff --git a/os/xdmcp.c b/os/xdmcp.c +index b6e97c9..0e9e625 100644 +--- a/os/xdmcp.c ++++ b/os/xdmcp.c +@@ -1409,8 +1409,16 @@ recv_alive_msg(unsigned length) + static void + XdmcpFatal(const char *type, ARRAY8Ptr status) + { +- FatalError("XDMCP fatal error: %s %*.*s\n", type, +- status->length, status->length, status->data); ++ char *error_message; ++ ++ /* error_message is leaked, but that's fine, we're aborting */ ++ error_message = malloc (status->length + 1); ++ if (!error_message) ++ FatalError("XDMCP fatal error: %s", type); ++ ++ memcpy(error_message, status->data, status->length); ++ error_message[status->length] = '\0'; ++ FatalError("XDMCP fatal error: %s %s\n", type, error_message); + } + + static void -- cgit v1.2.3-70-g09d2