summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-05-02 11:40:15 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-05-08 16:03:46 +0300
commitc5925f438429330e649cef67cb364af03f2175f7 (patch)
tree5da5d806f0127cf7e22474b81e6de004452549e7 /tools/perf/scripts/python/exported-sql-viewer.py
parenta59211ee4610226251a723e9381a2c145a28fc4c (diff)
downloadlinux-c5925f438429330e649cef67cb364af03f2175f7.tar.xz
platform/x86: oxpec: Add a lower bounds check in oxp_psy_ext_set_prop()
The "val->intval" variable is an integer which comes from the user. This code has an upper bounds check but the lower bounds check was accidentally omitted. The write_to_ec() take a u8 value as a parameter so negative values would be truncated to positive values in the 0-255 range. Return -EINVAL if the user passes a negative value. Fixes: 202593d1e86b ("platform/x86: oxpec: Add charge threshold and behaviour to OneXPlayer") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Antheas Kapenekakis <lkml@antheas.dev> Link: https://lore.kernel.org/r/aBSE71VKfBlQg_fZ@stanley.mountain Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions