mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
3570ee046c
commit
aa36d433b7
1 changed files with 1 additions and 1 deletions
|
@ -305,7 +305,7 @@ static void __init setup_zfcpdump(void)
|
|||
return;
|
||||
if (oldmem_data.start)
|
||||
return;
|
||||
strcat(boot_command_line, " cio_ignore=all,!ipldev,!condev");
|
||||
strlcat(boot_command_line, " cio_ignore=all,!ipldev,!condev", COMMAND_LINE_SIZE);
|
||||
console_loglevel = 2;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue