]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
rtl8187: Fix warning generated when strncpy() destination length matches the sixe...
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 20 Aug 2018 18:48:31 +0000 (13:48 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:29 +0000 (13:16 +0100)
commit9916188ba175768e1e17f070e2e715e845747fa3
treef29270fa44e3d269d61c99e2b8fa03a568f94189
parent0dc6e9e4893cf455d4d8e6491b4c283ffb61bfad
rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]

In gcc8, when the 3rd argument (size) of a call to strncpy() matches the
length of the first argument, the compiler warns of the possibility of an
unterminated string. Using strlcpy() forces a null at the end.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c