summaryrefslogtreecommitdiff
path: root/doc/usage/cmd/sbi.rst
diff options
context:
space:
mode:
authorWayen Yan <[email protected]>2026-07-08 12:06:08 +0800
committerTom Rini <[email protected]>2026-07-17 14:50:35 -0600
commitfdfe2ec48d5c1c2ed03073d73edd3fdd3fe1ffa1 (patch)
tree76dbb4269a67e3e329cebf1c38a7db1161b680ce /doc/usage/cmd/sbi.rst
parenta1a944f25c10dfa2ae3b344acbbeac39dc929bb8 (diff)
clk: airoha: fix off-by-one in clock ID boundary checkmain
The boundary checks in airoha_clk_enable(), airoha_clk_get_rate(), and airoha_clk_set_rate() use "id > data->num_clocks" which allows id equal to num_clocks to pass. Since data->descs[] has exactly num_clocks entries (indices 0 to num_clocks-1), id=num_clocks results in an out-of-bounds array access. This is currently not triggered because the device tree clock IDs are within bounds, but the check should be defensive. Fix by changing the comparison from ">" to ">=". Fixes: d0b81afb5ec9 ("clk: airoha: Add support for Airoha AN7581 SoC clock") Signed-off-by: Wayen Yan <[email protected]>
Diffstat (limited to 'doc/usage/cmd/sbi.rst')
0 files changed, 0 insertions, 0 deletions