[Xquartz-changes] xserver: Branch 'master' - 8 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Fri Dec 11 10:09:30 PST 2009


 Xi/xiproperty.c                   |    2 ++
 dix/main.c                        |    2 +-
 exa/exa_mixed.c                   |    1 -
 hw/xfree86/common/xf86Configure.c |    1 -
 xkb/xkb.c                         |   12 ++++++++----
 xkb/xkbLEDs.c                     |   12 +++++++-----
 6 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit d3e054ac07dae12a82ad764b0622fddbef4b9ec5
Merge: 12fb318... 97a6454...
Author: Keith Packard <keithp at keithp.com>
Date:   Fri Dec 11 09:22:22 2009 -0800

    Merge remote branch 'jeremyhu/master'

commit 12fb31815db9de9c01f2d4155a2b74531777c0bf
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Dec 7 12:58:57 2009 +1000

    xkb: don't assign garbage value to led_return.
    
    As the comment for the function states, led_return is undefined if map is
    NULL. We might as well skip writing to it then.
    
    Found by clang.
    
    Reported-by: Tomas Carnecky <tom at dbservice.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 00ae29c..35f8d1c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -3273,20 +3273,21 @@ _XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
                           int *led_return)
 {
     XkbIndicatorMapPtr  map;
-    int                 led;
 
     /* search for the right indicator */
     map = NULL;
     if (sli->names && sli->maps) {
+	int led;
+
 	for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
 	    if (sli->names[led] == indicator) {
 		map= &sli->maps[led];
+		*led_return = led;
 		break;
 	    }
 	}
     }
 
-    *led_return = led;
     return map;
 }
 
commit ea14a418214ba4c58910f5650d8b25b3fc3a7099
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Dec 3 11:21:31 2009 +1000

    Xi: reset device properties to NULL after deleting them. (#25374)
    
    Commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 introduced cleanup code to
    remove the accel properties when switching schemes. The same code is
    triggered by the default closedown code but only after unconditionally
    removing all device properties (as part of the cleanup). The properties,
    although deleted never got reset to NULL.
    
    X.Org Bug 25374 <http://bugs.freedesktop.org/show_bug.cgi?id=25374>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Tested-by: Andy Furniss <lists at andyfurniss.entadsl.com>
    Reviewed-by: Dave Airlie <airlied at redhat.com>

diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index ecb326e..ea66c54 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -622,6 +622,8 @@ XIDeleteAllDeviceProperties (DeviceIntPtr device)
         XIDestroyDeviceProperty(prop);
     }
 
+    device->properties.properties = NULL;
+
     /* Now free all handlers */
     curr_handler = device->properties.handlers;
     while(curr_handler)
commit 9ac6a048efaec51f158bbc1a4a3f448cbe5658ad
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Dec 9 11:43:34 2009 +1000

    xfree86: remove unused variable in configureDDMonitorSection.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 2df6b4e..d74d90b 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -577,7 +577,6 @@ static void handle_detailed_input(struct detailed_monitor_section *det_mon,
 static XF86ConfMonitorPtr
 configureDDCMonitorSection (int screennum)
 {
-    int i = 0;
     int len, mon_width, mon_height;
 #define displaySizeMaxLen 80
     char displaySize_string[displaySizeMaxLen];
commit 3fad969a90ccab604359ec4de05e745bb4b909e1
Author: Julien Cristau <jcristau at debian.org>
Date:   Sun Dec 6 20:27:06 2009 +0100

    Move config_init() after CreateWellKnownSockets() and InitCoreDevices()
    
    config_init() can now add devices directly instead of scheduling a
    timer.
    
    Signed-off-by: Julien Cristau <jcristau at debian.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/main.c b/dix/main.c
index f96245a..2117a1e 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -168,7 +168,6 @@ int main(int argc, char *argv[], char *envp[])
 	InitBlockAndWakeupHandlers();
 	/* Perform any operating system dependent initializations you'd like */
 	OsInit();
-        config_init();
 	if(serverGeneration == 1)
 	{
 	    CreateWellKnownSockets();
@@ -254,6 +253,7 @@ int main(int argc, char *argv[], char *envp[])
 	    InitRootWindow(WindowTable[i]);
 
         InitCoreDevices();
+        config_init();
 	InitInput(argc, argv);
 	InitAndStartDevices();
 
commit 886140787852c660978a9bb3abc7cc2702cbaed1
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Mon Dec 7 05:54:57 2009 +0100

    Fix possible NULL dereference in XkbFlushLedEvents()
    
    Through some code paths it is possible that NULL is being passed in the
    'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along
    to bzero().
    
    Signed-off-by: Tomas Carnecky <tom at dbservice.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/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 59cdba4..6ca80d7 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -745,12 +745,14 @@ XkbFlushLedEvents(	DeviceIntPtr			dev,
 			XkbDDXAccessXBeep(dev, _BEEP_LED_OFF, XkbAccessXFeedbackMask);
 	}
     }
-    if (ed && (ed->reason)) {
-	if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
-	    XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
-	XkbSendExtensionDeviceNotify(dev,cause->client,ed);
+    if (ed) {
+	if (ed->reason) {
+	    if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
+		XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
+	    XkbSendExtensionDeviceNotify(dev,cause->client,ed);
+	}
+	bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
     }
-    bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
     return;
 }
 
commit 92d9cb7e1340b259294ba317ea3a7d18487498b5
Author: Tomas Carnecky <tom at dbservice.com>
Date:   Sun Dec 6 23:52:54 2009 +0100

    XkbWriteCountedString(): return early if str is NULL
    
    This avoids NULL from being passed to memcpy() later in the code. While
    that wasn't an issue before - that value being NULL implied 'size == 0'
    so memcpy() wouldn't try to dereference it - it made the code harder
    to read and also confused clang.
    
    Signed-off-by: Tomas Carnecky <tom at dbservice.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/xkb/xkb.c b/xkb/xkb.c
index 98e879d..00ae29c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -4298,9 +4298,12 @@ ProcXkbSetNames(ClientPtr client)
 static char *
 XkbWriteCountedString(char *wire,char *str,Bool swap)
 {
-CARD16	len,*pLen;
+    CARD16 len,*pLen;
 
-    len= (str?strlen(str):0);
+    if (!str)
+        return wire;
+
+    len= strlen(str);
     pLen= (CARD16 *)wire;
     *pLen= len;
     if (swap) {
commit df2635d4644d1fa2772ff58d8d34cdf788ece412
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Thu Dec 10 00:04:53 2009 +0100

    EXA/mixed: Don't consider devKind for detecting dimension change.
    
    Fixes http://bugs.freedesktop.org/show_bug.cgi?id=25536 .
    
    There should be no reason for the pitch to actually change when none of the
    other dimensions do, and this could lead to incorrectly freeing the system
    memory copy when allocating a GPU copy, resulting in loss of valid pixmap
    contents.
    
    Signed-off-by: Michel Dänzer <daenzer at vmware.com>
    Acked-by: Maarten Maathuis <madman2003 at gmail.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index 0fb644b..155ed47 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -155,7 +155,6 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
 
     if (width != pPixmap->drawable.width ||
 	height != pPixmap->drawable.height ||
-	devKind != pPixmap->devKind ||
 	depth != pPixmap->drawable.depth ||
 	bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
 	if (pExaPixmap->driverPriv) {


More information about the Xquartz-changes mailing list