mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
dix: don't allow for devices with 0 axes
This just makes the existing behavior explicit, previously we relied on a malloc(numAxes * ...) to return NULL to error out.
This commit is contained in:
@@ -1335,6 +1335,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
|
||||
ValuatorClassPtr valc;
|
||||
|
||||
BUG_RETURN_VAL(dev == NULL, FALSE);
|
||||
BUG_RETURN_VAL(numAxes == 0, FALSE);
|
||||
|
||||
if (numAxes > MAX_VALUATORS) {
|
||||
LogMessage(X_WARNING,
|
||||
|
||||
Reference in New Issue
Block a user