mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-03 15:58:09 +02: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.
(cherry picked from commit 7aba2514b2)
This commit is contained in:
parent
8134574102
commit
d5c278fab4
1 changed files with 1 additions and 0 deletions
|
|
@ -1326,6 +1326,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