]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: btmrvl_sdio: Remove all strcpy() uses
authorLen Baker <len.baker@gmx.com>
Sat, 24 Jul 2021 12:21:52 +0000 (14:21 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 29 Jul 2021 11:46:13 +0000 (13:46 +0200)
commit01ba804afaf0ed558c3f0bddfbd3be694a00bb62
tree4cbd84d1f281f8bbc26e6101e8f77513577b20ec
parent7c83f5d72fb1f9430e8cb7654f5a432cbe8dae22
Bluetooth: btmrvl_sdio: Remove all strcpy() uses

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() but in
this case it is better to use the scnprintf to simplify the arithmetic.

This is a previous step in the path to remove the strcpy() function
entirely from the kernel.

Signed-off-by: Len Baker <len.baker@gmx.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_sdio.c