summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2026-08-26 14:19:57 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2026-08-31 11:34:41 +0530
commite11811a552252740bd396ec38378e9570ee16578 (patch)
tree6956f2f6b1968e877a902d57628299dec743a30d /scripts/basic
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
downloadlinux-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')
0 files changed, 0 insertions, 0 deletions