Files
linux-stable-mirror/drivers
Arnd Bergmann 02dc68829e net: qed: use correct strncpy() size
commit 11f711081a upstream.

passing the strlen() of the source string as the destination
length is pointless, and gcc-8 now warns about it:

drivers/net/ethernet/qlogic/qed/qed_debug.c: In function 'qed_grc_dump':
include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]

This changes qed_grc_dump_big_ram() to instead uses the length of
the destination buffer, and use strscpy() to guarantee nul-termination.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-08 13:03:41 +01:00
..
…
2018-10-03 17:00:59 -07:00
2018-07-22 14:28:43 +02:00
…
…
…
…
…
…
…
2018-12-08 13:03:38 +01:00
…
…
2018-08-22 07:46:11 +02:00
…
…
…
2018-12-08 13:03:41 +01:00
…
…
…
…
2018-11-10 07:48:34 -08:00
2018-09-15 09:45:27 +02:00
…
…
…
…
…
…
…
2018-11-13 11:15:11 -08:00
…
2018-12-08 13:03:38 +01:00
2018-11-27 16:10:51 +01:00
2018-10-03 17:00:46 -07:00
…
…
…
…