drivers/interrupt_controller: stm32: Fix table irq reading

We allow reading too far in exti_irq_table.
Fix if condition.

Fixes #17200

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2019-07-03 10:13:06 +02:00 committed by Ioannis Glaropoulos
parent 72ae24d8d5
commit 4b5095d350

View file

@ -98,7 +98,7 @@ int stm32_exti_enable(int line)
}
/* Get matching exti irq mathcing provided line thanks to irq_table */
if (line <= ARRAY_SIZE(exti_irq_table)) {
if (line < ARRAY_SIZE(exti_irq_table)) {
irqnum = exti_irq_table[line];
if (irqnum == 0xFF)
return 0;