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:Bin Meng <bmeng@tinylab.org> Reviewed-by:
Anup Patel <anup@brainfault.org>
parent
fabbc006
Please register or sign in to comment