]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/bluetooth/bnep/sock.c
Bluetooth: bnep: fix buffer overflow
[karo-tx-linux.git] / net / bluetooth / bnep / sock.c
index 2862f53b66b15b8b680322b32c5196f502adc7f0..d935da71ab3b57ff7c46962f339b257f39e57952 100644 (file)
@@ -88,6 +88,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        sockfd_put(nsock);
                        return -EBADFD;
                }
+               ca.device[sizeof(ca.device)-1] = 0;
 
                err = bnep_add_connection(&ca, nsock);
                if (!err) {