1
0

- u_XDMCP-Fix-format-in-XDMCP-fatal-error-printing.patch:

Fix XDMCP fatal error printing to not crash do to not supported
  format string (boo#948713).

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=590
This commit is contained in:
Egbert Eich 2015-11-09 16:51:49 +00:00 committed by Git OBS Bridge
parent 79b9f70dc6
commit 79e8592fb7
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From: Egbert Eich <eich@suse.de>
Date: Mon Nov 9 16:54:27 2015 +0100
Subject: [PATCH]XDMCP: Fix format in XDMCP fatal error printing
Patch-mainline: to be upstreamed
Git-commit: aefa0cadd72168ff7a41c79e547021edee27f53a
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
References: boo#948713
Signed-off-by: Egbert Eich <eich@suse.com>
XdmcpFatal() calls FatalError() with '%*.*s' in the format string.
FatalError() however 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 <eich@suse.de>
---
os/xdmcp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 5bdcbe9..b53db1f 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);
+ free(msg);
}
static void

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 9 16:46:35 UTC 2015 - eich@suse.com
- u_XDMCP-Fix-format-in-XDMCP-fatal-error-printing.patch:
Fix XDMCP fatal error printing to not crash do to not supported
format string (boo#948713).
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 28 17:32:07 UTC 2015 - sndirsch@suse.com Wed Oct 28 17:32:07 UTC 2015 - sndirsch@suse.com

View File

@ -185,6 +185,7 @@ Patch201: U_linux-Add-linux_parse_vt_settings-and-linux_get_keep.patch
Patch202: U_linux-Add-a-may_fail-paramter-to-linux_parse_vt_sett.patch Patch202: U_linux-Add-a-may_fail-paramter-to-linux_parse_vt_sett.patch
Patch203: U_systemd-logind-Only-use-systemd-logind-integration-t.patch Patch203: U_systemd-logind-Only-use-systemd-logind-integration-t.patch
Patch204: U_systemd-logind-do-not-rely-on-directed-signals.patch Patch204: U_systemd-logind-do-not-rely-on-directed-signals.patch
Patch205: u_XDMCP-Fix-format-in-XDMCP-fatal-error-printing.patch
Patch1000: n_xserver-optimus-autoconfig-hack.patch Patch1000: n_xserver-optimus-autoconfig-hack.patch
@ -282,6 +283,7 @@ cp %{SOURCE90} .
%patch202 -p1 %patch202 -p1
%patch203 -p1 %patch203 -p1
%patch204 -p1 %patch204 -p1
%patch205 -p1
%patch1000 -p1 %patch1000 -p1