fix: out-of-bounds access
Iterating on the interrupts descriptors assigned
to a VM must depend on VM_MANIFEST_MAX_INTERRUPTS,
rather than HF_NUM_INTIDS.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ifeb8526ea7e9a8f90f119e1c6cb0f4b862e6f44e
diff --git a/src/ffa/spmc/interrupts.c b/src/ffa/spmc/interrupts.c
index 755dcb4..d3a77d4 100644
--- a/src/ffa/spmc/interrupts.c
+++ b/src/ffa/spmc/interrupts.c
@@ -44,7 +44,7 @@
for (ffa_vm_count_t index = 0; index < vm_get_count(); ++index) {
struct vm *vm = vm_find_index(index);
- for (uint32_t j = 0; j < HF_NUM_INTIDS; j++) {
+ for (uint32_t j = 0; j < VM_MANIFEST_MAX_INTERRUPTS; j++) {
struct interrupt_descriptor int_desc =
vm->interrupt_desc[j];