Hi Len,
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 <redacted>
---
Changelog v1 -> v2
- Add spaces to the "plus" sign.
- Use the correct size for the fw_dump_ptr buffer (Adam Sampson)
drivers/bluetooth/btmrvl_sdio.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel