From: Egbert Eich <[email protected]>

XdmcpFatal() calls FatalError() with '%*.*s' in the format string.
FatalError() uses the async safe versions of printf() which only
support a subset of the POSIX printf formats - they don't contain
the '*' width and precision specifiers.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=948713
Signed-off-by: Egbert Eich <[email protected]>
---
 os/xdmcp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/os/xdmcp.c b/os/xdmcp.c
index 5bdcbe9..899e02e 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -1403,8 +1403,9 @@ _X_NORETURN
 static void
 XdmcpFatal(const char *type, ARRAY8Ptr status)
 {
-    FatalError("XDMCP fatal error: %s %*.*s\n", type,
-               status->length, status->length, status->data);
+    char *msg = strndup((char *)status->data, status->length);
+    FatalError("XDMCP fatal error: %s %s\n", type, msg);
+    /*NOTREACHED*/
 }
 
 static void
-- 
2.5.3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to