summaryrefslogtreecommitdiff
path: root/drivers/thermal/qcom
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-09-16 16:13:42 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2021-09-21 15:17:11 +0200
commit1bb30b20b49773369c299d4d6c65227201328663 (patch)
treeb90897c5469d47130ead0f4b869ca353a4e31567 /drivers/thermal/qcom
parent8b4bd256674720709a9d858a219fcac6f2f253b5 (diff)
thermal/core: Potential buffer overflow in thermal_build_list_of_policies()
After printing the list of thermal governors, then this function prints a newline character. The problem is that "size" has not been updated after printing the last governor. This means that it can write one character (the NUL terminator) beyond the end of the buffer. Get rid of the "size" variable and just use "PAGE_SIZE - count" directly. Fixes: 1b4f48494eb2 ("thermal: core: group functions related to governor handling") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210916131342.GB25094@kili
Diffstat (limited to 'drivers/thermal/qcom')
0 files changed, 0 insertions, 0 deletions