mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-09 13:08:12 +02:00
Xi: fail if we can't assign device names
During extension init this makes sense, failing to assign a name to a new device is more controversial but none of the paths handle this situation correctly right now so we're just as likely to introduce an exploit if the name remains NULL. Co-Authored-by: Claude Code <noreply@anthropic.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2184>
This commit is contained in:
parent
3c5f5f4cf1
commit
5d24ac3e6d
1 changed files with 3 additions and 3 deletions
|
|
@ -1207,7 +1207,7 @@ void
|
|||
AssignTypeAndName(DeviceIntPtr dev, Atom type, const char *name)
|
||||
{
|
||||
dev->xinput_type = type;
|
||||
dev->name = strdup(name);
|
||||
dev->name = XNFstrdup(name);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
@ -1356,9 +1356,9 @@ XInputExtensionInit(void)
|
|||
memset(&xi_all_devices, 0, sizeof(xi_all_devices));
|
||||
memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices));
|
||||
xi_all_devices.id = XIAllDevices;
|
||||
xi_all_devices.name = strdup("XIAllDevices");
|
||||
xi_all_devices.name = XNFstrdup("XIAllDevices");
|
||||
xi_all_master_devices.id = XIAllMasterDevices;
|
||||
xi_all_master_devices.name = strdup("XIAllMasterDevices");
|
||||
xi_all_master_devices.name = XNFstrdup("XIAllMasterDevices");
|
||||
|
||||
inputInfo.all_devices = &xi_all_devices;
|
||||
inputInfo.all_master_devices = &xi_all_master_devices;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue