[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/08] i386/i386at/kd.c (kdintr): quiet the GCC warning about sig
From: |
Marin Ramesa |
Subject: |
[PATCH 01/08] i386/i386at/kd.c (kdintr): quiet the GCC warning about signed overflow |
Date: |
Tue, 10 Dec 2013 19:19:56 +0100 |
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
- [PATCH 01/08] i386/i386at/kd.c (kdintr): quiet the GCC warning about signed overflow,
Marin Ramesa <=
- [PATCH 03/08] i386/i386/db_trace.c (db_i386_stack_trace): remove unnecessary cast, Marin Ramesa, 2013/12/10
- [PATCH 02/08] i386/i386/db_trace.c: remove forward declaration, Marin Ramesa, 2013/12/10
- [PATCH 05/08] i386/i386at/kd.c: remove forward declarations, Marin Ramesa, 2013/12/10
- [PATCH 04/08] i386/i386/ldt.c: remove forward declaration, Marin Ramesa, 2013/12/10
- [PATCH 06/08] i386/i386at/kd.c (kdmmap): remove unnecessary cast, Marin Ramesa, 2013/12/10
- [PATCH 07/08] i386/i386at/kd.c (kdinit): remove forward declaration, Marin Ramesa, 2013/12/10
- [PATCH 08/08] i386/i386at/kd_mouse.c (kd_mouse_open): remove forward declaration, Marin Ramesa, 2013/12/10