]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: core: Replace sprintf() in thermal_bind_cdev_to_trip()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 23 Feb 2026 07:32:45 +0000 (08:32 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Mar 2026 16:57:58 +0000 (17:57 +0100)
commit5ddd020b8bd0fb2fdcdc1f8c40513c656a690f80
tree2f9fe2fab0c49d1f82a910ae7bca6eadb1f6932a
parent11439c4635edd669ae435eec308f4ab8a0804808
thermal: core: Replace sprintf() in thermal_bind_cdev_to_trip()

Replace unbounded sprintf() with the safer snprintf(). While the
current code works correctly, snprintf() is safer and follows secure
coding best practices.

No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
[ rjw: Subject tweaks ]
Link: https://patch.msgid.link/20260223073245.321298-2-thorsten.blum@linux.dev
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c