mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 00:38:00 +02:00
modesetting: Validate the atom for enum properties
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.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit d4995a3936)
This commit is contained in:
parent
faeee76466
commit
87a7393799
1 changed files with 2 additions and 1 deletions
|
|
@ -1566,7 +1566,8 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
|
|||
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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue