Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btintel_pcie: use strscpy to copy plain strings

Use strscpy() instead of snprintf() to copy plain strings with no format
specifiers.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Thorsten Blum and committed by
Luiz Augusto von Dentz
76388eae 85fa3512

+2 -2
+2 -2
drivers/bluetooth/btintel_pcie.c
··· 351 351 snprintf(buf, sizeof(buf), "txq: cr_tia: %u cr_hia: %u", cr_tia, cr_hia); 352 352 skb_put_data(skb, buf, strlen(buf)); 353 353 bt_dev_dbg(hdev, "%s", buf); 354 - snprintf(buf, sizeof(buf), "--------------------------------"); 354 + strscpy(buf, "--------------------------------"); 355 355 bt_dev_dbg(hdev, "%s", buf); 356 356 357 357 hci_recv_diag(hdev, skb); ··· 661 661 else 662 662 return -EINVAL; 663 663 664 - snprintf(vendor, sizeof(vendor), "Vendor: Intel\n"); 664 + strscpy(vendor, "Vendor: Intel\n"); 665 665 snprintf(driver, sizeof(driver), "Driver: %s\n", 666 666 data->dmp_hdr.driver_name); 667 667