aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-10-01 18:44:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-01 19:11:16 -0400
commit196b3167efd13a02cdd34acc1a12316b9f45f41d (patch)
tree91f2fc91355dc0d26eb06ddde80ce6f2e1ebb9b7 /drivers/char
parent75e3a6aed99babdfa95f80d07421065ed004d186 (diff)
cyclades: fix read buffer overflow
irq is declared with size NR_CARDS (4), but the loop containing this segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and trying to use the result) Identified by the Parfait static scanner. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/cyclades.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index df5038bbcbc2..4254457d3911 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -3354,7 +3354,7 @@ static int __init cy_detect_isa(void)
3354 continue; 3354 continue;
3355 } 3355 }
3356#ifdef MODULE 3356#ifdef MODULE
3357 if (isparam && irq[i]) 3357 if (isparam && i < NR_CARDS && irq[i])
3358 cy_isa_irq = irq[i]; 3358 cy_isa_irq = irq[i];
3359 else 3359 else
3360#endif 3360#endif