]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/con3270: Use strscpy() instead of strcpy()
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 24 Apr 2025 09:27:10 +0000 (11:27 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 30 Apr 2025 09:41:28 +0000 (11:41 +0200)
commited5eef1141a35551a56c9cc0c475f0e0b6291e77
treed2622927827b25a0b184b46536d0b2e01f188385
parent7e7f94d1069ca914f91483fb03880b5eb5736235
s390/con3270: Use strscpy() instead of strcpy()

Use strscpy() instead of strcpy() so that bounds checking is performed
on the destination buffer. This requires to keep track of the size of
the dynamically allocated prompt memory area, which is done with a new
prompt_sz within struct tty3270.

Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/con3270.c