]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/netrom: prefer strscpy over strcpy
authorHongbo Li <lihongbo22@huawei.com>
Wed, 28 Aug 2024 12:32:21 +0000 (20:32 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Aug 2024 19:33:07 +0000 (12:33 -0700)
commit597be7bd17c36c8fa7e075f0da4decc7ca3b9d1d
tree460ac7b7677c10251acf74a48776e127c0bf05fc
parentb19f69a958300dcc93e453d7ed3fa354fc0f590c
net/netrom: prefer strscpy over strcpy

The deprecated helper strcpy() performs no bounds checking on the
destination buffer. This could result in linear overflows beyond
the end of the buffer, leading to all kinds of misbehaviors.
The safe replacement is strscpy() [1].

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240828123224.3697672-4-lihongbo22@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/netrom/nr_route.c