xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Mon Jun 12 22:59:36 UTC 2017


 hw/xfree86/drivers/modesetting/drmmode_display.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d4995a3936ae283b9080fdaa0905daa669ebacfc
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon Jun 12 14:43:23 2017 -0400

    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 at redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index aa6baae09..961b56127 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1557,7 +1557,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++) {


More information about the xorg-commit mailing list