diff options
-rw-r--r-- | net/bluetooth/hidp/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index b2bcbe2dc328..a7352ff3fd1e 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -931,7 +931,7 @@ static int hidp_setup_hid(struct hidp_session *session, | |||
931 | hid->version = req->version; | 931 | hid->version = req->version; |
932 | hid->country = req->country; | 932 | hid->country = req->country; |
933 | 933 | ||
934 | strncpy(hid->name, req->name, 128); | 934 | strncpy(hid->name, req->name, sizeof(req->name) - 1); |
935 | 935 | ||
936 | snprintf(hid->phys, sizeof(hid->phys), "%pMR", | 936 | snprintf(hid->phys, sizeof(hid->phys), "%pMR", |
937 | &bt_sk(session->ctrl_sock->sk)->src); | 937 | &bt_sk(session->ctrl_sock->sk)->src); |