]> git.dujemihanovic.xyz Git - u-boot.git/commit
firmware: scmi: correct a validity check against power domain id
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 7 Nov 2023 00:05:47 +0000 (09:05 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 10 Nov 2023 15:59:28 +0000 (10:59 -0500)
commit4808d1633336a98f3c48a94a7e1fcd1e1030a324
tree2ee4cf79e6d1d28fa309ea8f7c4fb5f52561afbe
parentd2174dbff1b492c682cc93903bc7456c2784e719
firmware: scmi: correct a validity check against power domain id

A power domain id on sandbox should be in the range from zero to
ARRAY_SIZE(scmi_pwdom) - 1. Correct the validity check logic.

Addresses-Coverity-ID: 467401 ("Out-of-bounds write")
Addresses-Coverity-ID: 467405 ("Out-of-bounds read")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
drivers/firmware/scmi/sandbox-scmi_agent.c