uxa: NameForAtom may return NULL

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-01 23:22:31 +01:00
parent 8451d5dd3c
commit 46fbb3d31b
1 changed files with 2 additions and 0 deletions

View File

@ -1176,6 +1176,8 @@ intel_output_set_property(xf86OutputPtr output, Atom property,
return FALSE;
memcpy(&atom, value->data, 4);
name = NameForAtom(atom);
if (name == NULL)
return FALSE;
/* search for matching name string, then set its value down */
for (j = 0; j < p->mode_prop->count_enums; j++) {