diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-17 13:13:59 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-17 13:13:59 +0200 |
commit | dc2a3eec17637007f91dffacd15a964e6d94ca50 (patch) | |
tree | dae50fee056e245c25da4bac64b8e07290fbecf1 /libterminput.c | |
parent | Unimportant fix to makefile (diff) | |
download | libterminput-dc2a3eec17637007f91dffacd15a964e6d94ca50.tar.gz libterminput-dc2a3eec17637007f91dffacd15a964e6d94ca50.tar.bz2 libterminput-dc2a3eec17637007f91dffacd15a964e6d94ca50.tar.xz |
Reject surrogates in CSI u
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libterminput.c')
-rw-r--r-- | libterminput.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libterminput.c b/libterminput.c index 81656aa..136f898 100644 --- a/libterminput.c +++ b/libterminput.c @@ -467,7 +467,7 @@ parse_sequence(union libterminput_input *input, struct libterminput_state *ctx) input->mouseevent.y = (size_t)nums[1] + (size_t)!nums[1]; break; case 'u': - if (nums[0] > 0x10FFFFULL) { + if (nums[0] > 0x10FFFFULL || (nums[0] & 0xD800) == 0xD800) { input->type = LIBTERMINPUT_NONE; break; } |