]> git.dujemihanovic.xyz Git - u-boot.git/commit
lmb: add a check to prevent memory overrun
authorSughosh Ganu <sughosh.ganu@linaro.org>
Mon, 21 Oct 2024 17:18:20 +0000 (22:48 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 29 Oct 2024 18:09:49 +0000 (12:09 -0600)
commitc3cf0dc64f1c39bc10530ef649fd7bf147e70720
tree9e971ba61e73ff3195f92014e47225ee7bea6d43
parent0d0864acfc94996fe080a354a869bbf7a66f5991
lmb: add a check to prevent memory overrun

When printing the LMB flags for a memory region, there is a need to
check that the array index that is computed is a sane value. Put a
noisy assert in case this check fails, as that implies something with
the LMB code is not working as expected.

Reported-by: Coverity (CID 510463)
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
lib/lmb.c