]> git.ipfire.org Git - thirdparty/linux.git/commit
s390/vmur: Use scnprintf() instead of sprintf()
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 7 Oct 2025 09:05:06 +0000 (11:05 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Sun, 7 Dec 2025 15:15:18 +0000 (16:15 +0100)
commitd9f59178011265344a4864757cf21523668a2a75
tree1aa51a4b5870cfe18980085bcb8f5003428e68c6
parent51d90a15fedf8366cb96ef68d0ea2d0bf15417d2
s390/vmur: 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.

Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/vmur.c