Commit 9a2eeb4a authored by Bin Meng's avatar Bin Meng Committed by Anup Patel
Browse files

lib: utils/irqchip: plic: Ensure no out-of-bound access in context save/restore helpers



Currently the context save/restore helpers writes/reads the provided
array using an index whose maximum value is determined by PLIC, which
potentially may disagree with the caller to these helpers.

Add a parameter to ask the caller to provide the size limit of the
array to ensure no out-of-bound access happens.

Signed-off-by: default avatarBin Meng <bmeng@tinylab.org>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent fabbc006
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment