plat/arm: css: Sanitize the input to css_validate_power_state
authorNariman Poushin <nariman.poushin@linaro.org>
Tue, 1 May 2018 12:07:47 +0000 (13:07 +0100)
committerNariman Poushin <nariman.poushin@linaro.org>
Sat, 23 Jun 2018 16:25:40 +0000 (17:25 +0100)
commit8e26307db63b1da1029713ba5d22b3428a2dab4b
treeef71c52a2748c94e270913768699926768a8442c
parent9b4c611c4b05fdf03722d2de488ea49beb10a8b7
plat/arm: css: Sanitize the input to css_validate_power_state

In the case of the platform max power level being less than the system
power level, make sure to not overrun the array of power states.

This fixes Coverity Scan OVERRUN defect CID 267021.

Change-Id: I52646ab9be2fceeb5c331b5dad7a6267991f4197
Signed-off-by: Nariman Poushin <nariman.poushin@linaro.org>
plat/arm/css/common/css_pm.c