mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 23:40:13 +01: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:
parent
5f48efa2bd
commit
7aba2514b2
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue