]> Gentwo Git Trees - linux/.git/commit
KVM: s390: Replace sprintf with snprintf for buffer safety
authorJosephine Pfeiffer <hi@josie.lol>
Wed, 1 Oct 2025 17:40:46 +0000 (19:40 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 20 Oct 2025 12:43:18 +0000 (12:43 +0000)
commitf5a6fa189ad2e73d25e31de3cc7f0bf81907c986
treefb119b498a637e426d5ada9fdb8e4426a7fcf6a1
parent7d5136ed1b218f7d68e15ff7a6d000a7ff3cce0f
KVM: s390: Replace sprintf with snprintf for buffer safety

Replace sprintf() with snprintf() when formatting debug names to prevent
potential buffer overflow. The debug_name buffer is 16 bytes, and while
unlikely to overflow with current PIDs, using snprintf() provides proper
bounds checking.

Signed-off-by: Josephine Pfeiffer <hi@josie.lol>
[frankja@linux.ibm.com: Fixed subject prefix]
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/kvm/kvm-s390.c