From 555126441e3e3aec225227517d03fa4981900ece Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 30 Jan 2018 15:24:42 -0800 Subject: [PATCH] GUACAMOLE-313: Remove code handling Unicode codepoints which cannot be represented by X11 keysyms. --- src/guaclog/keydef.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/guaclog/keydef.c b/src/guaclog/keydef.c index 802bdd86..ee9275ec 100644 --- a/src/guaclog/keydef.c +++ b/src/guaclog/keydef.c @@ -236,18 +236,11 @@ static guaclog_keydef* guaclog_get_unicode_key(int keysym) { mask = 0xC0; bytes = 2; } - else if (codepoint <= 0xFFFF) { + else { + assert(codepoint <= 0xFFFF); mask = 0xE0; bytes = 3; } - else if (codepoint <= 0x1FFFFF) { - mask = 0xF0; - bytes = 4; - } - - /* Otherwise, invalid codepoint */ - else - return NULL; /* Offset buffer by size */ char* key_name = unicode_keydef_name + bytes;