]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: most: core: replace strcpy() by strscpy()
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Mon, 22 Apr 2019 15:40:38 +0000 (10:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 15:37:39 +0000 (17:37 +0200)
commit472592bb5fa74b1fc51046fb7ec56d5d101999a0
tree9f991279f9d309e4e85e341cfe0195776bebd107
parent4e160b91c77632b9c3ed09f1ee762953072ed088
staging: most: core: replace strcpy() by strscpy()

[ Upstream commit 3970d0d81816310175b6272e709ee09dd3e05171 ]

The strcpy() function is being deprecated. Replace it by the safer
strscpy() and fix the following Coverity warning:

"You might overrun the 80-character fixed-size string iface->p->name
by copying iface->description without checking the length."

Addresses-Coverity-ID: 1444760 ("Copy into fixed size buffer")
Fixes: 131ac62253db ("staging: most: core: use device description as name")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/most/core.c