diff options
author | Julian Orth <ju.orth@gmail.com> | 2022-01-07 23:28:02 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-01-08 15:20:02 +0000 |
commit | 777628e7616f321709cc43c64c2ce0c79afced6b (patch) | |
tree | bf66d381710b365705d548594ac4a2ff36fbb985 /common/msg.h | |
parent | 3978669ece8bf2f5cb7318782607840195244368 (diff) | |
download | mpv-777628e7616f321709cc43c64c2ce0c79afced6b.tar.bz2 mpv-777628e7616f321709cc43c64c2ce0c79afced6b.tar.xz |
wayland: use `xkb_keymap_new_from_buffer`
Instead of `xkb_keymap_new_from_string`. The protocol does not require
the keymap to be null terminated and if the size of the keymap is a
multiple of the page size, using `_from_string` could lead to problems.
Some compositors include a null byte and even include the null byte in
`size`. Therefore we have to use `strnlen` to find the real length of
the string. Note that `_from_string` internally uses `strlen` and then
calls `_from_buffer`.
Diffstat (limited to 'common/msg.h')
0 files changed, 0 insertions, 0 deletions