diff options
author | Adam Jackson <ajax@redhat.com> | 2017-06-13 09:26:28 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-06-13 09:26:38 -0400 |
commit | ccba8f89995de7d5e1b216e580b789c4cda05035 (patch) | |
tree | 8c2145c6b0416456ed4ca1f461c4dc042b150c9f | |
parent | 6c8e21c686578f22d973a243a09c838943ddbadd (diff) |
The client could have said anything here, and if what they said doesn't
actually name an atom NameForAtom() will return NULL, and strcmp() will
be unhappy about that.
[copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc]
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | src/drmmode_display.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index c3a55e6..83f323d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -898,7 +898,8 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, if (value->type != XA_ATOM || value->format != 32 || value->size != 1) return FALSE; memcpy(&atom, value->data, 4); - name = NameForAtom(atom); + if (!(name = NameForAtom(atom))) + return FALSE; /* search for matching name string, then set its value down */ for (j = 0; j < p->mode_prop->count_enums; j++) { |