configure.ac | 2 +- src/bsd_mouse.c | 3 +++ src/mouse.c | 17 ++++++++++++----- src/pnp.c | 2 +- src/sun_mouse.c | 10 +++++++--- 5 files changed, 24 insertions(+), 10 deletions(-)
New commits: commit 80d724d13a8de585722967f7d18a65b4b555badd Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Thu Mar 15 23:34:21 2012 -0700 xf86-input-mouse 1.7.2 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/configure.ac b/configure.ac index 4c5e92c..8ad7f65 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-mouse], - [1.7.1], + [1.7.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-mouse]) AC_CONFIG_SRCDIR([Makefile.am]) commit 68a1e2f74dd58c913e5d1f8d6138cd8ce73232a4 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Thu Dec 22 20:55:45 2011 -0800 sun_mouse.c: remove unused variables Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/sun_mouse.c b/src/sun_mouse.c index 755ed32..ad38ba4 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -203,7 +203,6 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags) { MouseDevPtr pMse = pInfo->private; VuidMsePtr pVuidMse; - int buttons, i; /* Ensure we don't add the same device twice */ if (getVuidMsePriv(pInfo) != NULL) @@ -279,7 +278,6 @@ vuidReadInput(InputInfoPtr pInfo) int buttons; int dx = 0, dy = 0, dz = 0, dw = 0; unsigned int n; - int c; unsigned char *pBuf; int absX = 0, absY = 0; Bool absXset = FALSE, absYset = FALSE; commit a5126694b29bdf9c852254b53174fcf37537b121 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Thu Dec 22 20:54:14 2011 -0800 Mark symtab_t.name in pnp.c as const to fix gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> diff --git a/src/pnp.c b/src/pnp.c index 2a98e50..762dae5 100644 --- a/src/pnp.c +++ b/src/pnp.c @@ -61,7 +61,7 @@ typedef struct { /* symbol table entry */ typedef struct { - char *name; + const char *name; MouseProtocolID val; } symtab_t; commit 8bc8502c698115c3f4885ba42e60ede0e681caaa Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Wed Nov 30 19:29:01 2011 -0800 Avoid NULL pointer dereference in autoProbeMouse if proto == PROT_UNSUP Error: Null pointer dereference (CWE 476) Read from null pointer 'GetProtocol(proto)' at line 3477 of src/mouse.c in function 'autoProbeMouse'. Function 'GetProtocol' may return constant 'NULL' at line 736, called at line 3477. Null pointer introduced at line 736 in function 'GetProtocol'. We already handle one of the two cases that make GetProtocol return NULL, proto == PROTO_UNKNOWN, but not PROT_UNSUP. [ This bug was found by the Parfait 0.4.2 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Alexandr Shadchin <alexandr.shadc...@gmail.com> diff --git a/src/mouse.c b/src/mouse.c index 5160786..f4c7c82 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -3469,12 +3469,14 @@ autoProbeMouse(InputInfoPtr pInfo, Bool inSync, Bool lostSync) case AUTOPROBE_SWITCH_PROTOCOL: { MouseProtocolID proto; + MouseProtocolPtr pProto; void *defaults; AP_DBG(("State SWITCH_PROTOCOL\n")); proto = mPriv->protoList[mPriv->protocolID++]; if (proto == PROT_UNKNOWN) mPriv->autoState = AUTOPROBE_SWITCHSERIAL; - else if (!(defaults = GetProtocol(proto)->defaults) + else if (!((pProto = GetProtocol(proto)) && + ((defaults = pProto->defaults))) || (mPriv->serialDefaultsNum == -1 && (defaults == msDefaults)) || (mPriv->serialDefaultsNum != -1 commit b65651974ee5620086b484086ea12d78c92fa369 Author: Alexandr Shadchin <alexandr.shadc...@gmail.com> Date: Fri Aug 19 21:07:13 2011 +0600 Fix wrong read Protocol and Device from xorg.conf Add call xf86CollectInputOptions() before using pInfo->options. The bug is seeing by ABI < 12. Signed-off-by: Alexandr Shadchin <alexandr.shadc...@gmail.com> Reviewed-by: Matthieu Herrb <matthieu.he...@laas.fr> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/mouse.c b/src/mouse.c index d883b82..5160786 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -872,6 +872,8 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags) pInfo->private_flags = 0; pInfo->always_core_feedback = NULL; + COLLECT_INPUT_OPTIONS(pInfo, NULL); + if (NewMousePreInit(drv, pInfo, flags) == Success) { /* Check if SendDragEvents has been disabled. */ commit 7bb5cbecbcc24f20467546f957fb95c9190514c0 Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Mon Jul 25 21:11:50 2011 -0700 sun_mouse.c: Ensure vuidMouse setup routines are called for protocol "Auto" Fixes regression caused by commit b12fa0d5ab23 in which devices with protocol "Auto" (generally just PS/2 devices on Solaris, since HAL sets protocol "VUID" for USB devices already) weren't going through vuidMousePreInit and setting up the device_control & read_input pointers to the routines which know how to decode VUID packets. Adds a check to vuidPreInit to ensure we don't leak memory if called twice for the same device, just in case I missed a code path, or a new one appears in the future. Fixes Solaris bug 7070321: Mouse protocol "Auto" does not work in build 170 Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Acked-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/sun_mouse.c b/src/sun_mouse.c index b0d53e8..755ed32 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -205,6 +205,10 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags) VuidMsePtr pVuidMse; int buttons, i; + /* Ensure we don't add the same device twice */ + if (getVuidMsePriv(pInfo) != NULL) + return TRUE; + pVuidMse = calloc(sizeof(VuidMseRec), 1); if (pVuidMse == NULL) { xf86Msg(X_ERROR, "%s: cannot allocate VuidMouseRec\n", pInfo->name); @@ -684,7 +688,9 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara) } else if (pMse->protocolID == PROT_AUTO) { pdev = xf86CheckStrOption(pInfo->options, "Device", NULL); - solarisMouseAutoProbe(pInfo, &pproto, &pdev); + if ((solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) && + (pproto != NULL)) + sunMousePreInit(pInfo, pproto, 0); } return pproto; } commit 94fb2250b12fbaf840352b83dd9f832319c92b0f Author: Alan Coopersmith <alan.coopersm...@oracle.com> Date: Mon Jul 25 20:40:03 2011 -0700 No need to merge NULL options list with existing options Appending NULL to an existing options list simply walks the entire existing list before returning it unchanged, so if we aren't creating a new list to merge, don't bother merging it either. Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/mouse.c b/src/mouse.c index 238d7f7..d883b82 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2431,13 +2431,13 @@ SetupMouse(InputInfoPtr pInfo) * for the new protocol. */ if (pMse->oldProtocolID != pMse->protocolID) { - pointer tmp = NULL; if ((pMse->protocolID >= 0) && (pMse->protocolID < PROT_NUMPROTOS) - && mouseProtocols[pMse->protocolID].defaults) - tmp = xf86OptionListCreate( + && mouseProtocols[pMse->protocolID].defaults) { + pointer tmp = xf86OptionListCreate( mouseProtocols[pMse->protocolID].defaults, -1, 0); - pInfo->options = xf86OptionListMerge(pInfo->options, tmp); + pInfo->options = xf86OptionListMerge(pInfo->options, tmp); + } /* * If baudrate is set write it back to the option * list so that the serial interface code can access commit 93ebeecdda61cc7121b5c095ed5db07ad0ca0f88 Author: Terry Lambert <tlamb...@chromium.org> Date: Fri Jul 15 17:23:23 2011 -0700 xf86-input-mouse: Return proper default for unknown values in pInfo->device_control. Signed-off-by: Terry Lambert <tlamb...@chromium.org> Reviewed-by: Stephane Marchesin <marc...@chromium.org> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> diff --git a/src/bsd_mouse.c b/src/bsd_mouse.c index 14b529d..e9f61f8 100644 --- a/src/bsd_mouse.c +++ b/src/bsd_mouse.c @@ -555,6 +555,9 @@ usbMouseProc(DeviceIntPtr pPointer, int what) pPointer->public.on = FALSE; usleep(300000); break; + + default: + return BadValue; } return Success; } diff --git a/src/mouse.c b/src/mouse.c index d981f6f..238d7f7 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1691,6 +1691,9 @@ MouseProc(DeviceIntPtr device, int what) free(pMse->mousePriv); pMse->mousePriv = NULL; break; + + default: + return BadValue; } return Success; } -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1s9mdg-0005aw...@vasks.debian.org