Bluetooth: hidp: fix buffer overflow
[pandora-kernel.git] / net / bluetooth / hidp / sock.c
index 178ac7f..69140e2 100644 (file)
@@ -84,6 +84,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        sockfd_put(csock);
                        return err;
                }
+               ca.name[sizeof(ca.name)-1] = 0;
 
                if (csock->sk->sk_state != BT_CONNECTED ||
                                isock->sk->sk_state != BT_CONNECTED) {