mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 07:50:14 +01:00
Xi: memset the device name padding to 0.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
09266d6cd1
commit
2bda50ee14
1 changed files with 2 additions and 1 deletions
|
|
@ -359,8 +359,9 @@ ListDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo* info)
|
|||
info->enabled = dev->enabled;
|
||||
total_len = sizeof(xXIDeviceInfo);
|
||||
|
||||
strncpy(any, dev->name, info->name_len);
|
||||
len = ((info->name_len + 3)/4) * 4;
|
||||
memset(any, 0, len);
|
||||
strncpy(any, dev->name, info->name_len);
|
||||
any += len;
|
||||
total_len += len;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue