diff options
3 files changed, 63 insertions, 1 deletions
diff --git a/xorg-server-hwcursor-gamma/PKGBUILD b/xorg-server-hwcursor-gamma/PKGBUILD index dae9f77..a57458e 100644 --- a/xorg-server-hwcursor-gamma/PKGBUILD +++ b/xorg-server-hwcursor-gamma/PKGBUILD @@ -5,7 +5,7 @@ _pkgname=xorg-server pkgname=xorg-server-hwcursor-gamma pkgver=1.17.1 -pkgrel=1 +pkgrel=2 pkgdesc="Xorg X server with patch to apply gamma ramps on hardware cursors" depends=(libepoxy libxdmcp libxfont libpciaccess libdrm pixman libgcrypt libxau xorg-server-common xf86-input-evdev libxshmfence libgl) provides=("xorg-server=${pkgver}" 'X-ABI-VIDEODRV_VERSION=19' 'X-ABI-XINPUT_VERSION=21' 'X-ABI-EXTENSION_VERSION=9.0' 'x-server') @@ -25,6 +25,8 @@ source=(${url}/releases/individual/xserver/${_pkgname}-${pkgver}.tar.bz2 nvidia-drm-outputclass.conf xvfb-run xvfb-run.1 + os-access-fix-regression-in-server-interpreted-auth.patch + v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch 0001-When-an-cursor-is-set-it-is-adjusted-to-use-the.patch 0002-Fix-for-full-and-semi-transparency-under-negative-im.patch 0003-Use-Harms-s-suggest-do-not-use-inline-if.-And-fix-si.patch) @@ -32,6 +34,8 @@ sha256sums=('2bf8e9f6f0a710dec1d2472467bff1f4e247cb6dcd76eb469aafdc8a2d7db2ab' 'af1c3d2ea5de7f6a6b5f7c60951a189a4749d1495e5462f3157ae7ac8fe1dc56' 'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9' '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776' + '8a9d76eecf8795ca645fb1ce261733965578e953f6606153ce001a0e15d036e8' + 'a73e33644682d9f430db987c192da0f7193907af50539669ebd59614a5ebd0f9' 'bea348631dedd66475d84ac2cfe0840f22a80a642b4680d73fead4749e47f055' 'be9169b937b5d0b44f7f05d7c08aaa5f0c1092e128ce261d9cb350f09dfe1fb0' '0a643ae83e03faee0f4db669a33c5b3c99edbba5c86cde2c83962ae536d31081') @@ -42,6 +46,11 @@ prepare() { patch -Np1 -i ../0001-When-an-cursor-is-set-it-is-adjusted-to-use-the.patch patch -Np1 -i ../0002-Fix-for-full-and-semi-transparency-under-negative-im.patch patch -Np1 -i ../0003-Use-Harms-s-suggest-do-not-use-inline-if.-And-fix-si.patch + + # fix FS#43884, not yet upstream + patch -Np1 -i ../os-access-fix-regression-in-server-interpreted-auth.patch + # partially fix FS#43867, not yet upstream + patch -Np1 -i ../v2-xserver-Fix-a-crash-with-XDMCP-error-handler.patch } build() { diff --git a/xorg-server-hwcursor-gamma/os-access-fix-regression-in-server-interpreted-auth.patch b/xorg-server-hwcursor-gamma/os-access-fix-regression-in-server-interpreted-auth.patch new file mode 100644 index 0000000..b96bb7a --- /dev/null +++ b/xorg-server-hwcursor-gamma/os-access-fix-regression-in-server-interpreted-auth.patch @@ -0,0 +1,30 @@ +diff --git a/os/access.c b/os/access.c +index 28f2d32..fe6e831 100644 +--- a/os/access.c ++++ b/os/access.c +@@ -1390,14 +1390,23 @@ InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client) + else + return 0; + } ++ ++ /* An empty address requires both a NULL addr *and* a zero length ++ * as the address comparison functions call memcmp with both ++ * parameters. Make sure they agree here ++ */ ++ if (addr == NULL) ++ len = 0; ++ if (len == 0) ++ addr = NULL; + for (host = validhosts; host; host = host->next) { + if (host->family == FamilyServerInterpreted) { +- if (addr && siAddrMatch(family, addr, len, host, client)) { ++ if (siAddrMatch(family, addr, len, host, client)) { + return 0; + } + } + else { +- if (addr && addrEqual(family, addr, len, host)) ++ if (addrEqual(family, addr, len, host)) + return 0; + } + 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 |