s390/setup: use strlcat() instead of strcat()
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 11 Sep 2023 11:03:00 +0000 (13:03 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 19 Sep 2023 11:26:56 +0000 (13:26 +0200)
commitaa36d433b79657c1fed31ff5ae2bbd6f7bc123aa
tree658ca183390e94c088c6a4f06bde51189c9648ec
parent3570ee046c46b5dc3d077e3e60616b141a221027
s390/setup: use strlcat() instead of strcat()

Use strlcat() instead of strcat() in order to get rid of this W=1
warning:

In function ‘strlcat’,
    inlined from ‘strcat’ at ./include/linux/fortify-string.h:432:6,
    inlined from ‘setup_zfcpdump’ at arch/s390/kernel/setup.c:308:2,
    inlined from ‘setup_arch’ at arch/s390/kernel/setup.c:1002:2:
./include/linux/fortify-string.h:406:19: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  406 |         p[actual] = '\0';
      |         ~~~~~~~~~~^~~~~~

As stated in fortify-string.h strcat() should not be used, since
FORTIFY_SOURCE cannot figure out the size of the destination buffer.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/setup.c