]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86/intel/uncore-freq: Replace sprintf() with scnprintf()
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>
Tue, 30 Dec 2025 12:45:15 +0000 (18:15 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 6 Jan 2026 08:57:08 +0000 (10:57 +0200)
commit050a0aab15da9e1d14cd41073046d12d29f443c6
tree06a02a6be00deff65899a2937998a811438e5ca0
parent751e2ebf29a74c0e46144cbb35e5be478bcd7668
platform/x86/intel/uncore-freq: Replace sprintf() with scnprintf()

Replace unbounded sprintf() calls with scnprintf() to prevent potential
buffer overflows when formatting device names. While the current format
strings cannot overflow the buffer, using scnprintf() follows kernel
best practices for string formatting.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Link: https://patch.msgid.link/20251230124516.229125-2-kaushlendra.kumar@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c