]> Gentwo Git Trees - linux/.git/commit
s390/dasd: Use scnprintf() instead of sprintf()
authorJan Höppner <hoeppner@linux.ibm.com>
Wed, 26 Nov 2025 16:06:34 +0000 (17:06 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 26 Nov 2025 17:14:17 +0000 (10:14 -0700)
commita857d99201cc4eb3cb78b9dcb6f1d027ef3ae699
tree4f864b40e8ca2a7bc0e7913fe8a74e49206a1799
parent43198756ee8cade0acc17a89f959764cd17776bb
s390/dasd: Use scnprintf() instead of sprintf()

Use scnprintf() instead of sprintf() for those cases where the
destination is an array and the size of the array is known at compile
time.

This prevents theoretical buffer overflows, but also avoids that people
again and again spend time to figure out if the code is actually safe.

Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/s390/block/dasd_devmap.c