mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Make sure dev.name is always nul-terminated
This commit is contained in:
parent
cd6e797fde
commit
fa006cfb6f
@ -562,7 +562,7 @@ static int uinput_create(char *name)
|
||||
|
||||
memset(&dev, 0, sizeof(dev));
|
||||
if (name)
|
||||
strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE);
|
||||
strncpy(dev.name, name, UINPUT_MAX_NAME_SIZE - 1);
|
||||
|
||||
dev.id.bustype = BUS_BLUETOOTH;
|
||||
dev.id.vendor = 0x0000;
|
||||
|
Loading…
Reference in New Issue
Block a user