mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
terminal: Do not call toupper with potentially out-of-range values.
For instance, if Ctrl-F1 were pressed and src/terminal/kbd.c supported it, then toupper(KBD_F1) would be called, resulting in undefined behaviour. src/terminal/kbd.c does not support such combinations yet, but it is safest to fix the bug already.
This commit is contained in:
parent
50603fc66c
commit
9e30ee631c
@ -256,7 +256,7 @@ handle_interlink_event(struct terminal *term, struct term_event *ev)
|
||||
|
||||
reset_timer();
|
||||
|
||||
if (check_kbd_modifier(ev, KBD_MOD_CTRL) && toupper(key) == 'L') {
|
||||
if (check_kbd_modifier(ev, KBD_MOD_CTRL) && (key == 'l' || key == 'L')) {
|
||||
redraw_terminal_cls(term);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user