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>
This commit is contained in:
Josephine Pfeiffer 2025-10-01 21:14:04 +02:00 • committed by Heiko Carstens
commit 5379879a76