[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxi: Changes to 'upstream-unstable'



 configure.ac    |    2 +-
 man/Makefile.am |    1 -
 src/XGMotion.c  |    2 ++
 src/XGetDCtl.c  |   12 +++++++++---
 4 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit f0ecfd1952289f5ff33297e3358552365e047f09
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date:   Mon Nov 17 11:12:39 2008 +1000

    libXi 1.1.4

diff --git a/configure.ac b/configure.ac
index 4df3964..02972ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
 
-AC_INIT(libXi, 1.1.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
+AC_INIT(libXi, 1.1.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit 3e99cc281509c70c9240e71ae55cf4e62c6569ba
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Sun Mar 9 08:30:32 2008 +0100

    nuke RCS Ids

diff --git a/man/Makefile.am b/man/Makefile.am
index f91efaf..9efc88c 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,3 @@
-# $Id$
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # 

commit 411340ccb7070e2e966a36f64f2fb3019ea0242a
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Nov 29 13:49:21 2007 -0800

    Coverity #743/744: Returned without freeing storage bufp/savp
    
    If either bufp or savp failed to malloc, we returned without freeing the other.

diff --git a/src/XGMotion.c b/src/XGMotion.c
index daa8792..cd361dd 100644
--- a/src/XGMotion.c
+++ b/src/XGMotion.c
@@ -115,6 +115,8 @@ Time stop;
     savp = readp = (int *)Xmalloc(size);
     bufp = (int *)Xmalloc(size2);
     if (!bufp || !savp) {
+	Xfree(bufp);
+	Xfree(savp);
 	*nEvents = 0;
 	_XEatData(dpy, (unsigned long)size);
 	UnlockDisplay(dpy);

commit 5ac8f5dcfb2cf5f695c903179a5a95ac6bd4303e
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Tue Nov 27 10:47:56 2007 +1030

    GetDeviceControl: calculate the length field correctly.
    
    Length field should indicate the length of the struct in bytes. Not the length
    of the pointer to the struct...
    (cherry picked from commit ddcc71df2a273a410cb5a933aef5501fa56d84cf)

diff --git a/src/XGetDCtl.c b/src/XGetDCtl.c
index 2e06b65..7689059 100644
--- a/src/XGetDCtl.c
+++ b/src/XGetDCtl.c
@@ -104,6 +104,12 @@ XGetDeviceControl(dpy, dev, control)
 	sav = d;
 	_XRead(dpy, (char *)d, nbytes);
 
+        /* In theory, we should just be able to use d->length to get the size.
+         * Turns out that a number of X servers (up to and including server
+         * 1.4) sent the wrong length value down the wire. So to not break
+         * apps that run against older servers, we have to calculate the size
+         * manually.
+         */
 	switch (d->control) {
 	case DEVICE_RESOLUTION:
 	{
@@ -170,7 +176,7 @@ XGetDeviceControl(dpy, dev, control)
             XDeviceAbsCalibState *C = (XDeviceAbsCalibState *) Device;
 
             C->control = DEVICE_ABS_CALIB;
-            C->length = sizeof(C);
+            C->length = sizeof(XDeviceAbsCalibState);
             C->min_x = c->min_x;
             C->max_x = c->max_x;
             C->min_y = c->min_y;
@@ -188,7 +194,7 @@ XGetDeviceControl(dpy, dev, control)
             XDeviceAbsAreaState *A = (XDeviceAbsAreaState *) Device;
 
             A->control = DEVICE_ABS_AREA;
-            A->length = sizeof(A);
+            A->length = sizeof(XDeviceAbsAreaState);
             A->offset_x = a->offset_x;
             A->offset_y = a->offset_y;
             A->width = a->width;
@@ -204,7 +210,7 @@ XGetDeviceControl(dpy, dev, control)
             XDeviceCoreState *C = (XDeviceCoreState *) Device;
 
             C->control = DEVICE_CORE;
-            C->length = sizeof(C);
+            C->length = sizeof(XDeviceCoreState);
             C->status = c->status;
             C->iscore = c->iscore;
 


Reply to: