power: fg-memif: fix an OOB access while getting number of partitions
Currently, sram_address is assigned to the start address of next
partition to see if the address is within the next partition.
This can end up accessing the next element of address map causing
an out of bounds access when the last partition is accessed
already. Fix this by simplifying the calculation to find number
of partitions.
CRs-Fixed: 2130104
Change-Id: Idab43471b4e6e964152b5a46f0e2f0a4bfc03471
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment