Commit 1468d6b1 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Heiko Carstens
Browse files

s390/boot: Replace strncpy() with strscpy()



Replace the last 2 usages of strncpy() in s390 code with strscpy().

Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent f271df9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ void parse_boot_command_line(void)
		if (!strcmp(param, "bootdebug")) {
			bootdebug = true;
			if (val)
				strncpy(bootdebug_filter, val, sizeof(bootdebug_filter) - 1);
				strscpy(bootdebug_filter, val);
		}
		if (!strcmp(param, "quiet"))
			boot_console_loglevel = CONSOLE_LOGLEVEL_QUIET;
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static noinline char *strsym(char *buf, void *ip)

	p = findsym((unsigned long)ip, &off, &len);
	if (p) {
		strncpy(buf, p, MAX_SYMLEN);
		strscpy(buf, p, MAX_SYMLEN);
		/* reserve 15 bytes for offset/len in symbol+0x1234/0x1234 */
		p = buf + strnlen(buf, MAX_SYMLEN - 15);
		strcpy(p, "+0x");