diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-02-22 11:13:47 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-02-22 11:13:47 -0200 |
commit | 347563dcabc0523b027591ddc27266c951da31f2 (patch) | |
tree | b43a6c280e81cadae7a7c101888de74e3a8a65f1 /libre/xorg-server/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch | |
parent | f4c5c98479fda7669402bc9b505d83e26a591166 (diff) |
xorg-server-1.17.1-2.parabola1: fix FS#43884 -> https://bugs.archlinux.org/task/43884, and partially FS#43867 -> https://bugs.archlinux.org/task/43867
Diffstat (limited to 'libre/xorg-server/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch')
-rw-r--r-- | libre/xorg-server/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libre/xorg-server/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch b/libre/xorg-server/v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch new file mode 100644 index 000000000..02dbaf22f --- /dev/null +++ b/libre/xorg-server/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 |