Disallow producing NULL character with escape sequences
authorPierre Le Marre <dev@wismill.eu>
Tue, 26 Sep 2023 15:05:05 +0000 (17:05 +0200)
committerWismill <dev@wismill.eu>
Tue, 26 Sep 2023 15:25:49 +0000 (17:25 +0200)
commitca7aa69cc0fb102cfa41edf4f9b5f1c68b2c49e5
treef1c8529c10435bdbe8582a044dc8f62d6526fa13
parenta17701327e4bc6daa54114041a9707e00e15d82c
Disallow producing NULL character with escape sequences

NULL usually terminates the strings; allowing to produce it via escape
sequences may lead to undefined behaviour.

- Make NULL escape sequences (e.g. `\0` and `\x0`) invalid.
- Add corresponding test.
- Introduce the new message: XKB_WARNING_INVALID_ESCAPE_SEQUENCE.
doc/message-registry.md
doc/message-registry.yaml
src/compose/parser.c
src/messages-codes.h
src/utils.h
src/xkbcomp/scanner.c
test/compose.c
test/data/keymaps/invalid-escape-sequence.xkb [new file with mode: 0644]
test/filecomp.c
tools/messages.c