Skip to content
Permalink
Browse files

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>
  • Loading branch information...
erwango authored and ioannisg committed Jul 3, 2019
1 parent 72ae24d commit 4b5095d3503aa3291288484fa5bea88995562c56
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/interrupt_controller/exti_stm32.c
@@ -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;

0 comments on commit 4b5095d

Please sign in to comment.
You can’t perform that action at this time.