diff options
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r-- | xorg-server/dix/devices.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 45de713ce..1c86d5242 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -955,7 +955,7 @@ CloseDevice(DeviceIntPtr dev) while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr) dev, dev->xkb_interest->resource); - free((void *) dev->name); + free(dev->name); classes = (ClassesPtr) &dev->key; FreeAllDeviceClasses(classes); @@ -1279,6 +1279,7 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels, BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->button != NULL, FALSE); + BUG_RETURN_VAL(numButtons >= MAX_BUTTONS, FALSE); butc = calloc(1, sizeof(ButtonClassRec)); if (!butc) |