keysym-utf: reject out-of-range Unicode codepoints in xkb_keysym_to_utf{8,32}
authorRan Benita <ran234@gmail.com>
Sat, 23 Jun 2018 19:00:19 +0000 (22:00 +0300)
committerRan Benita <ran234@gmail.com>
Sat, 23 Jun 2018 19:53:42 +0000 (22:53 +0300)
commit5cee660f692b67fdb2ce677fc516382bf0e93af1
treec5fa7cfb94875e14da00dff1d68207fd9c2044dd
parentb63196e91e7d78e88a9012f3f44152eeef5358cf
keysym-utf: reject out-of-range Unicode codepoints in xkb_keysym_to_utf{8,32}

It used to be UTF-8 was defined for inputs > 0x10FFFF, but nowadays
that's the maximum and a codepoint is encoded up to 4 bytes, not 6.

Fixes: https://github.com/xkbcommon/libxkbcommon/issues/58
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/59
Reported-by: @andrecbarros
Signed-off-by: Ran Benita <ran234@gmail.com>
src/keysym-utf.c
src/utf8.c
test/keysym.c
test/utf8.c