mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
base-hw/muen: add explicit array-bounds check
This commit is contained in:
parent
5635c1318c
commit
de764d8490
@ -40,12 +40,13 @@ class Board::Pic
|
||||
|
||||
void irq_occurred(unsigned irq)
|
||||
{
|
||||
isr[irq] = true;
|
||||
if (irq < NR_OF_IRQ)
|
||||
isr[irq] = true;
|
||||
}
|
||||
|
||||
bool take_request(unsigned &irq)
|
||||
{
|
||||
for (int i = 0; i < 256; i++) {
|
||||
for (int i = 0; i < NR_OF_IRQ; i++) {
|
||||
if (isr[i] == true) {
|
||||
irq = i;
|
||||
isr[i] = false;
|
||||
|
Loading…
Reference in New Issue
Block a user