diff options
Diffstat (limited to 'os/xdmcp.c')
-rw-r--r-- | os/xdmcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/os/xdmcp.c b/os/xdmcp.c index 99616d94b..c5204adfb 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -1409,8 +1409,11 @@ 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 *text = malloc(status->length + 1); + strncpy(text, status->data, status->length); + text[status->length] = 0; + FatalError("XDMCP fatal error: %s %s\n", type, text); + free(text); } static void |