summaryrefslogtreecommitdiff
path: root/tools/testing/shared/xarray-shared.c
diff options
context:
space:
mode:
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>2025-09-06 14:53:16 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-09-10 13:20:10 +0300
commit5590db443a40a35d7fba2db12701346be621a19e (patch)
tree91fe0a3b0aa81d24eb16d836daa65a9ccb0a04c3 /tools/testing/shared/xarray-shared.c
parentae1bdd23b99f64335c69d546bff99ca39b894c18 (diff)
downloadlinux-5590db443a40a35d7fba2db12701346be621a19e.tar.xz
cpufreq: conservative: Replace sscanf() with kstrtouint()
Replace sscanf() with kstrtouint() in all sysfs store functions to improve input validation and security. The kstrtouint() function provides better error detection, overflow protection, and consistent error handling compared to sscanf(). This maintains existing functionality while improving input validation robustness and following kernel coding best practices for string parsing. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/20250906115316.3010384-1-kaushlendra.kumar@intel.com [ rjw: Dropped duplicate paragraph from the changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/testing/shared/xarray-shared.c')
0 files changed, 0 insertions, 0 deletions