Message ID | 1360102042-10732-33-git-send-email-herton.krzesinski@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 2c20d76..217359b 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -949,7 +949,7 @@ static int hidp_setup_hid(struct hidp_session *session, hid->version = req->version; hid->country = req->country; - strncpy(hid->name, req->name, 128); + strncpy(hid->name, req->name, sizeof(req->name) - 1); strncpy(hid->phys, batostr(&bt_sk(session->ctrl_sock->sk)->src), 64); strncpy(hid->uniq, batostr(&bt_sk(session->ctrl_sock->sk)->dst), 64);