]> Gentwo Git Trees - linux/.git/commit
s390/extmem: Replace sprintf() with snprintf() for buffer safety
authorJosephine Pfeiffer <hi@josie.lol>
Wed, 1 Oct 2025 19:14:04 +0000 (21:14 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 21 Oct 2025 08:17:29 +0000 (10:17 +0200)
commit5379879a76e25998d56c2136fef7d67eae33418f
tree60e3004e82dfca1a3beac610dd60f188907c1bf3
parentdd7d1d34ae484ba2caed8e01e03bdc4c263b1442
s390/extmem: Replace sprintf() with snprintf() for buffer safety

Replace unsafe sprintf() calls with snprintf() in segment_save() to
prevent potential buffer overflows. The function builds command strings
by repeatedly appending to a fixed-size buffer, which could overflow if
segment ranges are numerous or values are large.

Signed-off-by: Josephine Pfeiffer <hi@josie.lol>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/extmem.c