WIDTH_KMAP is the number of columns in the key_map table. Check
if char_idx is less than WIDTH_KMAP and break the for loop if
that is not the case.
i386/i386at/kd.c (kdintr): Break the for loop if char_idx is larger or equal to
WIDTH_KMAP.
---
i386/i386at/kd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 757bce2..6b7f242 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -849,7 +849,7 @@ int vec;
* char sequence, for function keys) onto the
* input queue.
*/
- for ( ; (c != K_DONE) && (char_idx <= max);
+ for ( ; (c != K_DONE) && (char_idx <= max) && (char_idx
< WIDTH_KMAP);
c = key_map[scancode][char_idx++]) {
(*linesw[tp->t_line].l_rint)(c, tp);
}
--
1.8.1.4