lib: sbi: Ensure domidx_to_domain_table is null-terminated
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 30 Jan 2023 16:42:24 +0000 (17:42 +0100)
committerAnup Patel <anup@brainfault.org>
Wed, 8 Feb 2023 08:12:45 +0000 (13:42 +0530)
commit66b0e23a0cecb863b8fbb24c337be5710f31da62
tree4bffffc0634a1ee09f9f09f522f68fbddbb1b97f
parent199189bd1c172aab5a9733c0ffaaa14bbebb3323
lib: sbi: Ensure domidx_to_domain_table is null-terminated

sbi_domain_for_each() requires domidx_to_domain_table[] to be
null-terminated. Allocate one extra element which will always
be null.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_domain.c