[PR #796] xkb: ProcXkbGetKbdByName(): extra payload size sanity check

PR: https://github.com/X11Libre/xserver/pull/796
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-19 19:21:25 +02:00
parent 9f034e9008
commit a9e27cf240

View File

@@ -6090,6 +6090,10 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbAssembleGeometry(client, new->geom, grep, &childbuf);
if (childbuf.wpos != (grep.length * 4))
LogMessage(X_WARNING, "ProcXkbGetKbdByName() childbuf size (%ld) mismatch nrep size (%ld // %d units)\n",
(unsigned long)childbuf.wpos, (unsigned long)grep.length * 4, grep.length);
if (client->swapped) {
swaps(&grep.sequenceNumber);
swapl(&grep.length);