xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Mar 27 19:58:34 UTC 2017


 hw/dmx/dmxsync.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 21eda7464d0e13ac6558edaf6531c3d3251e05df
Author: Tobias Stoeckmann <tobias at stoeckmann.org>
Date:   Sun Mar 12 14:21:38 2017 +0100

    dmx: Fix null pointer dereference
    
    A null pointer dereference can occur in dmxSync, because TimerForce
    does not handle a null pointer.
    
    dmxSyncTimer is set to NULL a few lines above on a certain condition,
    which happened on my machine. The explicit NULL check allowed me to
    start Xdmx again without a segmentation fault.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/hw/dmx/dmxsync.c b/hw/dmx/dmxsync.c
index 1bc242343..b55c9ddf3 100644
--- a/hw/dmx/dmxsync.c
+++ b/hw/dmx/dmxsync.c
@@ -182,7 +182,7 @@ dmxSync(DMXScreenInfo * dmxScreen, Bool now)
 
         /* Do sync or set time for later */
         if (now || !dmxScreen) {
-            if (!TimerForce(dmxSyncTimer))
+            if (dmxSyncTimer == NULL || !TimerForce(dmxSyncTimer))
                 dmxSyncCallback(NULL, 0, NULL);
             /* At this point, dmxSyncPending == 0 because
              * dmxSyncCallback must have been called. */


More information about the xorg-commit mailing list