Skip to content

(release/25.1) xkb: Fix serialization of key type without level names#2282

Open
metux wants to merge 1 commit intorelease/25.1from
pr/xkb-fix-serialization-of-key-type-without-level-names-_2026-04-18_19-50-20
Open

(release/25.1) xkb: Fix serialization of key type without level names#2282
metux wants to merge 1 commit intorelease/25.1from
pr/xkb-fix-serialization-of-key-type-without-level-names-_2026-04-18_19-50-20

Conversation

@metux
Copy link
Copy Markdown
Contributor

@metux metux commented Apr 18, 2026

Before this commit the count of key type level names was wrongly set
in XkbGetNames: for key type without names, it was set to the level
count, while it should be 0:

  • XkbComputeGetNamesReplySize() does not account key type without
    level names;
  • XkbSendNames() does not write any level entry for key types without
    level names.

This causes a mismatch offset while parsing the response and its
processing would ultimately fail.

Fixed by setting the correct level name count: 0 if there is no level
name, else the number of levels.

Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2082

@metux metux self-assigned this Apr 18, 2026
@metux metux requested a review from a team April 18, 2026 17:50
@metux metux force-pushed the pr/xkb-fix-serialization-of-key-type-without-level-names-_2026-04-18_19-50-20 branch from d97097c to 8bf5297 Compare April 19, 2026 11:51
Before this commit the count of key type level names was wrongly set
in `XkbGetNames`: for key type without names, it was set to the level
count, while it should be 0:
- `XkbComputeGetNamesReplySize()` does not account key type without
  level names;
- `XkbSendNames()` does not write any level entry for key types without
  level names.

This causes a mismatch offset while parsing the response and its
processing would ultimately fail.

Fixed by setting the correct level name count: 0 if there is no level
name, else the number of levels.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2082>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants