diff options
| author | Colin Ian King <colin.i.king@gmail.com> | 2026-08-26 14:19:57 +0100 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2026-08-31 11:34:41 +0530 |
| commit | e11811a552252740bd396ec38378e9570ee16578 (patch) | |
| tree | 6956f2f6b1968e877a902d57628299dec743a30d /scripts/basic/split-include.c | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-e11811a552252740bd396ec38378e9570ee16578.tar.gz linux-e11811a552252740bd396ec38378e9570ee16578.zip | |
OPP: of: Fix potential multiplication overflow when calculating freq
The multiplication be32_to_cpup(val++) * 1000 is performed using 32 bit
unsigned integers and hence uses a 32 bit multiplication; this will
overflow if be32_to_cpup(val++) is greater than 4294967 (which is
very unlikely at present). The result is assigned to an unsigned long
(which is a 64 bit value on 64 bit systems), so fix this potential
overflow by casting the first operand of the multiplication to
an unsigned int.
Fixes: b496dfbc94ab ("PM / OPP: Initialize OPP table from device tree")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
