mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
75e3a6aed9
commit
196b3167ef
1 changed files with 1 additions and 1 deletions
|
@ -3354,7 +3354,7 @@ static int __init cy_detect_isa(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
if (isparam && irq[i])
|
if (isparam && i < NR_CARDS && irq[i])
|
||||||
cy_isa_irq = irq[i];
|
cy_isa_irq = irq[i];
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue