Prevent overflow of octal escape sequences
authorPierre Le Marre <dev@wismill.eu>
Tue, 26 Sep 2023 15:05:14 +0000 (17:05 +0200)
committerWismill <dev@wismill.eu>
Tue, 26 Sep 2023 15:25:49 +0000 (17:25 +0200)
commit0038c866078a409b40d4d194f597768284d7ff32
treeeaf8708d75520aa0836bb81d44a524e8e0383102
parentca7aa69cc0fb102cfa41edf4f9b5f1c68b2c49e5
Prevent overflow of octal escape sequences

The octal parser accepts the range `\1..\777`. The result is cast to
`char` which will silently overflow.

This commit prevents overlow and will treat `\400..\777` as invalid
escape sequences.
src/scanner-utils.h
test/compose.c
test/data/keymaps/invalid-escape-sequence.xkb