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.
--- commit 129c5bb4dcafbfcf62d75c3e02db45699fb56536 tree eff984b17a0b9497ecafe88e5134db0f029fc2b9 parent ec5615acd7252563fc4745f14a7afbba049227fa author Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Sat, 05 Aug 2006 13:30:00 +0300 committer Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Sat, 05 Aug 2006 19:51:30 +0300 src/terminal/event.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/terminal/event.c b/src/terminal/event.c index 71f3950..2032e0e 100644 --- a/src/terminal/event.c +++ b/src/terminal/event.c @@ -256,7 +256,7 @@ #endif 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;
pgphdAkZs0AKL.pgp
Description: PGP signature
_______________________________________________ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev