mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 06:04:49 +00:00
be more careful in IVAS
Don't walk off the end of a NULL pointer in InitValuatorAxisStruct.
This commit is contained in:
committed by
Daniel Stone
parent
7711c56d2e
commit
d32dc8bf19
@@ -302,7 +302,12 @@ _X_EXPORT void
|
||||
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval,
|
||||
int resolution, int min_res, int max_res)
|
||||
{
|
||||
register AxisInfoPtr ax = dev->valuator->axes + axnum;
|
||||
register AxisInfoPtr ax;
|
||||
|
||||
if (!dev || !dev->valuator)
|
||||
return NULL;
|
||||
|
||||
ax = dev->valuator->axes + axnum;
|
||||
|
||||
ax->min_value = minval;
|
||||
ax->max_value = maxval;
|
||||
|
||||
Reference in New Issue
Block a user