diff options
author | Russell King <rmk@armlinux.org.uk> | 2018-06-27 21:35:03 +0100 |
---|---|---|
committer | Russell King <rmk@armlinux.org.uk> | 2018-07-13 18:13:11 +0100 |
commit | 37cfd644519c076f17ecf99b80ff4bab80630c4c (patch) | |
tree | 7f92455f16a808ebdb2c07f1d83c5e511f0e4fd3 | |
parent | a1441c12c98e01a0e1c3cad634347aa1cc905c30 (diff) |
src: avoid NULL pointer dereference when setting output properties
Avoid a potential NULL pointer dereference when we try to set output
properties in common_drm_conn_set_property(). Only properties that
are registered with RandR have the atom array.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
-rw-r--r-- | src/common_drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common_drm.c b/src/common_drm.c index fc1f648..2ff3363 100644 --- a/src/common_drm.c +++ b/src/common_drm.c @@ -373,7 +373,7 @@ static Bool common_drm_conn_set_property(xf86OutputPtr output, Atom property, struct common_drm_property *prop = &conn->props[i]; drmModePropertyPtr dprop; - if (prop->atoms[0] != property) + if (!prop->atoms || prop->atoms[0] != property) continue; dprop = prop->mode_prop; |