]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/bluetooth/hidp/sock.c
Merge tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubca...
[linux.git] / net / bluetooth / hidp / sock.c
index 2151913892ce8705d093a96fa65c3888e8a6dbb1..03be6a4baef30e8121d6fe087274f20fe55f37e3 100644 (file)
@@ -192,6 +192,7 @@ static int hidp_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigne
                ca.version = ca32.version;
                ca.flags = ca32.flags;
                ca.idle_to = ca32.idle_to;
+               ca32.name[sizeof(ca32.name) - 1] = '\0';
                memcpy(ca.name, ca32.name, 128);
 
                csock = sockfd_lookup(ca.ctrl_sock, &err);