Hello community, here is the log from the commit of package libXi for openSUSE:Factory checked in at 2015-09-24 06:12:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libXi (Old) and /work/SRC/openSUSE:Factory/.libXi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libXi" Changes: -------- --- /work/SRC/openSUSE:Factory/libXi/libXi.changes 2014-07-21 10:35:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libXi.new/libXi.changes 2015-09-24 06:12:50.000000000 +0200 @@ -1,0 +2,16 @@ +Fri Sep 11 12:09:30 UTC 2015 - [email protected] + +- Update to version 1.7.5: + A couple of important bugfixes that have accumulated over the last + year. + + Fix version check in _XIAllowEvents + + Advance the request buffer by the right amount in XIChangeHierarchy + + Fix double unlock when _XiCheckExtInit return -1. + + XIChangeHierarchy: Add missing unlock. + + Do not return NoSuchExtension casted to pointer as an error. + + XIGetClientPointer: Return False on error. + + Fix logic in _XIAllowEvents and prevent double unlock. + + Refactor XGetExtensionVersion. + + XIGrabDevice: Unlock display in error path. + +------------------------------------------------------------------- Old: ---- libXi-1.7.4.tar.bz2 New: ---- libXi-1.7.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libXi.spec ++++++ --- /var/tmp/diff_new_pack.OHvFHe/_old 2015-09-24 06:12:51.000000000 +0200 +++ /var/tmp/diff_new_pack.OHvFHe/_new 2015-09-24 06:12:51.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package libXi # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: libXi %define lname libXi6 -Version: 1.7.4 +Version: 1.7.5 Release: 0 Summary: X Input Extension library License: MIT ++++++ libXi-1.7.4.tar.bz2 -> libXi-1.7.5.tar.bz2 ++++++ ++++ 4640 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/ChangeLog new/libXi-1.7.5/ChangeLog --- old/libXi-1.7.4/ChangeLog 2014-07-18 08:47:15.000000000 +0200 +++ new/libXi-1.7.5/ChangeLog 2015-09-09 17:17:33.000000000 +0200 @@ -1,3 +1,122 @@ +commit f180dff710dc54d00e0e26b84de053151f8f207e +Author: Peter Hutterer <[email protected]> +Date: Thu Sep 10 01:16:19 2015 +1000 + + libXi 1.7.5 + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 05c86e53c0bae30e58b32b94e191c8720990918a +Author: Cosimo Cecchi <[email protected]> +Date: Tue Feb 24 07:49:34 2015 +1000 + + Fix version check in _XIAllowEvents + + Commit 5810d0797160a97012664ffe719a59e1b288a525 changed _XIAllowEvents() to + use _XiCheckVersion() instead of _XiCheckExtInit() to avoid a double display + unlock, but it failed to correctly check for the version, since we should set + have_XI22 to True for every version greater or equal to 2.2. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit c648441036cf5ffc5225cd484e2c906d374f0a4b +Author: Michal Srb <[email protected]> +Date: Mon Nov 3 12:43:40 2014 +0200 + + XIGrabDevice: Unlock display in error path. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 29c77457ad86966ae2204b865fb8b437269063c4 +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:57 2014 +0200 + + Refactor XGetExtensionVersion. + + _XiGetExtensionVersion was called from XGetExtensionVersion and from + _XiCheckExtInit. When called from _XiCheckExtInit, nothing accounted for the + fact that it can return ((XExtensionVersion *) NoSuchExtension) in case of + error. Also it recursively calls _XiCheckExtInit potentionally causing multiple + unlocks if _XiCheckExtInit fails. + -> Remove it and call directly _XiGetExtensionVersionRequest and only call + _XiCheckExtInit only from XGetExtensionVersion. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 5810d0797160a97012664ffe719a59e1b288a525 +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:56 2014 +0200 + + Fix logic in _XIAllowEvents and prevent double unlock. + + Replacing the second _XiCheckExtInit with _XiCheckVersion prevents possible + double unlock as _XiCheckExtInit actually unlocks the display when it returns + -1. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit f699770e7c92da1dbf16892fde83438f0b79c979 +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:54 2014 +0200 + + XIGetClientPointer: Return False on error. + + Not NoSuchExtension which is 1 = True! + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit dc1f8c6ec1ba8135afa185c8e8360c1ed90bf96c +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:53 2014 +0200 + + Do not return NoSuchExtension casted to pointer as an error. + + Several functions were returning NoSuchExtension casted to a pointer in case of + an error. Often in parallel with returning NULL in case of another error. It is + undocumented and certainly wrong. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 83261c52a17543437882e2863b7f06a92c9039f8 +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:52 2014 +0200 + + XIChangeHierarchy: Add missing unlock. + + When num_changes <= 0 or Xmalloc fails, the display has to be unlocked. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 22ae8d4f26e92b17e1ce8239a38481933d6f1ca7 +Author: Michal Srb <[email protected]> +Date: Sat Nov 1 20:00:51 2014 +0200 + + Fix double unlock when _XiCheckExtInit return -1. + + _XiCheckExtInit unlocks the display if it fails and returns -1. Most callers + account for it properly, but few didn't. + + Signed-off-by: Michal Srb <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 71a42145b678be623e30bd5bf55833a04f14376f +Author: Julien Cristau <[email protected]> +Date: Mon Oct 27 19:00:36 2014 +0100 + + Advance the request buffer by the right amount in XIChangeHierarchy + + c->length is in 4-byte units, dptr is a char *, so we need to advance + dptr by 4 * length to get the position of the next HierarchyChangeInfo. + + Reviewed-by: Peter Hutterer <[email protected]> + Signed-off-by: Julien Cristau <[email protected]> + commit 8c255b30f3a4ed8bf67e6bb76df47cbd480735f8 Author: Peter Hutterer <[email protected]> Date: Fri Jul 18 16:45:51 2014 +1000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/compile new/libXi-1.7.5/compile --- old/libXi-1.7.4/compile 1970-01-01 01:00:00.000000000 +0100 +++ new/libXi-1.7.5/compile 2015-09-09 17:15:28.000000000 +0200 @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Written by Tom Tromey <[email protected]>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <[email protected]> or send patches to +# <[email protected]>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to <[email protected]>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/configure.ac new/libXi-1.7.5/configure.ac --- old/libXi-1.7.4/configure.ac 2014-07-18 08:45:45.000000000 +0200 +++ new/libXi-1.7.5/configure.ac 2015-09-09 17:14:59.000000000 +0200 @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXi], [1.7.4], +AC_INIT([libXi], [1.7.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([src/config.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/missing new/libXi-1.7.5/missing --- old/libXi-1.7.4/missing 2013-07-03 03:03:56.000000000 +0200 +++ new/libXi-1.7.5/missing 2015-09-09 17:15:28.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XExtInt.c new/libXi-1.7.5/src/XExtInt.c --- old/libXi-1.7.4/src/XExtInt.c 2013-12-03 01:32:16.000000000 +0100 +++ new/libXi-1.7.5/src/XExtInt.c 2014-11-03 06:28:36.000000000 +0100 @@ -380,7 +380,7 @@ return (-1); } ((XInputData *) info->data)->vers = - _XiGetExtensionVersion(dpy, "XInputExtension", info); + _XiGetExtensionVersionRequest(dpy, "XInputExtension", info->codes->major_opcode); } if (_XiCheckVersion(info, version_index) < 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGMotion.c new/libXi-1.7.5/src/XGMotion.c --- old/libXi-1.7.4/src/XGMotion.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XGMotion.c 2014-11-03 06:28:35.000000000 +0100 @@ -81,7 +81,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XDeviceTimeCoord *) NoSuchExtension); + return NULL; GetReq(GetDeviceMotionEvents, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetCPtr.c new/libXi-1.7.5/src/XGetCPtr.c --- old/libXi-1.7.4/src/XGetCPtr.c 2011-12-20 01:28:44.000000000 +0100 +++ new/libXi-1.7.5/src/XGetCPtr.c 2014-11-03 06:28:35.000000000 +0100 @@ -49,7 +49,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) - return (NoSuchExtension); + return False; GetReq(XIGetClientPointer, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetDCtl.c new/libXi-1.7.5/src/XGetDCtl.c --- old/libXi-1.7.4/src/XGetDCtl.c 2013-06-26 21:37:18.000000000 +0200 +++ new/libXi-1.7.5/src/XGetDCtl.c 2014-11-03 06:28:35.000000000 +0100 @@ -79,7 +79,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Add_XChangeDeviceControl, info) == -1) - return ((XDeviceControl *) NoSuchExtension); + return NULL; GetReq(GetDeviceControl, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetFCtl.c new/libXi-1.7.5/src/XGetFCtl.c --- old/libXi-1.7.4/src/XGetFCtl.c 2013-06-27 22:07:18.000000000 +0200 +++ new/libXi-1.7.5/src/XGetFCtl.c 2014-11-03 06:28:35.000000000 +0100 @@ -79,7 +79,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XFeedbackState *) NoSuchExtension); + return NULL; GetReq(GetFeedbackControl, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetKMap.c new/libXi-1.7.5/src/XGetKMap.c --- old/libXi-1.7.4/src/XGetKMap.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XGetKMap.c 2014-11-03 06:28:35.000000000 +0100 @@ -78,7 +78,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((KeySym *) NoSuchExtension); + return NULL; GetReq(GetDeviceKeyMapping, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetMMap.c new/libXi-1.7.5/src/XGetMMap.c --- old/libXi-1.7.4/src/XGetMMap.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XGetMMap.c 2014-11-03 06:28:35.000000000 +0100 @@ -73,7 +73,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XModifierKeymap *) NoSuchExtension); + return NULL; GetReq(GetDeviceModifierMapping, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetProp.c new/libXi-1.7.5/src/XGetProp.c --- old/libXi-1.7.4/src/XGetProp.c 2013-06-26 21:37:18.000000000 +0200 +++ new/libXi-1.7.5/src/XGetProp.c 2014-11-03 06:28:35.000000000 +0100 @@ -75,7 +75,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XEventClass *) NoSuchExtension); + return NULL; GetReq(GetDeviceDontPropagateList, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XGetVers.c new/libXi-1.7.5/src/XGetVers.c --- old/libXi-1.7.4/src/XGetVers.c 2011-12-20 01:28:44.000000000 +0100 +++ new/libXi-1.7.5/src/XGetVers.c 2014-11-03 06:28:36.000000000 +0100 @@ -68,12 +68,16 @@ XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - ext = _XiGetExtensionVersion(dpy, name, info); - if (ext != (XExtensionVersion *) NoSuchExtension) { - UnlockDisplay(dpy); - SyncHandle(); - } - return (ext); + + if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) + return NULL; + + ext = _XiGetExtensionVersionRequest(dpy, name, info->codes->major_opcode); + + UnlockDisplay(dpy); + SyncHandle(); + + return ext; } _X_HIDDEN XExtensionVersion* @@ -91,7 +95,7 @@ _XSend(dpy, name, (long)req->nbytes); if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) { - return (XExtensionVersion *) NULL; + return NULL; } ext = (XExtensionVersion *) Xmalloc(sizeof(XExtensionVersion)); @@ -105,13 +109,3 @@ return ext; } - -_X_HIDDEN XExtensionVersion * -_XiGetExtensionVersion(register Display * dpy, _Xconst char *name, - XExtDisplayInfo *info) -{ - if (_XiCheckExtInit(dpy, Dont_Check, info) == -1) - return ((XExtensionVersion *) NoSuchExtension); - - return _XiGetExtensionVersionRequest(dpy, name, info->codes->major_opcode); -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIAllowEvents.c new/libXi-1.7.5/src/XIAllowEvents.c --- old/libXi-1.7.4/src/XIAllowEvents.c 2014-07-14 00:45:18.000000000 +0200 +++ new/libXi-1.7.5/src/XIAllowEvents.c 2015-02-23 22:49:22.000000000 +0100 @@ -40,7 +40,7 @@ _XIAllowEvents(Display *dpy, int deviceid, int event_mode, Time time, unsigned int touchid, Window grab_window) { - Bool have_XI22 = True; + Bool have_XI22 = False; xXIAllowEventsReq *req; xXI2_2AllowEventsReq *req_XI22; @@ -50,7 +50,7 @@ if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1) return (NoSuchExtension); - if (_XiCheckExtInit(dpy, XInput_2_2, extinfo) == 0) + if (_XiCheckVersion(extinfo, XInput_2_2) >= 0) have_XI22 = True; if (have_XI22) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIGrabDevice.c new/libXi-1.7.5/src/XIGrabDevice.c --- old/libXi-1.7.4/src/XIGrabDevice.c 2013-06-26 22:24:43.000000000 +0200 +++ new/libXi-1.7.5/src/XIGrabDevice.c 2014-11-04 00:11:57.000000000 +0100 @@ -53,14 +53,20 @@ if (mask->mask_len > INT_MAX - 3 || (mask->mask_len + 3)/4 >= 0xffff) - return BadValue; + { + reply.status = BadValue; + goto out; + } /* mask->mask_len is in bytes, but we need 4-byte units on the wire, * and they need to be padded with 0 */ len = (mask->mask_len + 3)/4; buff = calloc(4, len); if (!buff) - return BadAlloc; + { + reply.status = BadAlloc; + goto out; + } GetReq(XIGrabDevice, req); req->reqType = extinfo->codes->major_opcode; @@ -83,6 +89,7 @@ if (_XReply(dpy, (xReply *)&reply, 0, xTrue) == 0) reply.status = GrabSuccess; +out: UnlockDisplay(dpy); SyncHandle(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIHierarchy.c new/libXi-1.7.5/src/XIHierarchy.c --- old/libXi-1.7.4/src/XIHierarchy.c 2011-12-20 01:28:44.000000000 +0100 +++ new/libXi-1.7.5/src/XIHierarchy.c 2014-11-03 06:28:35.000000000 +0100 @@ -49,14 +49,14 @@ xXIChangeHierarchyReq *req; XExtDisplayInfo *info = XInput_find_display(dpy); char *data = NULL, *dptr; - int dlen = 0, i; + int dlen = 0, i, ret = Success; LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) return (NoSuchExtension); if (num_changes <= 0) - return Success; + goto out; GetReq(XIChangeHierarchy, req); req->reqType = info->codes->major_opcode; @@ -91,8 +91,10 @@ req->length += dlen / 4; /* dlen is 4-byte aligned */ data = Xmalloc(dlen); - if (!data) - return BadAlloc; + if (!data) { + ret = BadAlloc; + goto out; + } dptr = data; for (i = 0, any = changes; i < num_changes; i++, any++) @@ -109,7 +111,7 @@ c->name_len = strlen(C->name); c->length = (sizeof(xXIAddMasterInfo) + c->name_len + 3)/4; strncpy((char*)&c[1], C->name, c->name_len); - dptr += c->length; + dptr += 4 * c->length; } break; case XIRemoveMaster: @@ -155,8 +157,10 @@ } Data(dpy, data, dlen); + +out: Xfree(data); UnlockDisplay(dpy); SyncHandle(); - return Success; + return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIProperties.c new/libXi-1.7.5/src/XIProperties.c --- old/libXi-1.7.4/src/XIProperties.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XIProperties.c 2014-11-03 06:28:35.000000000 +0100 @@ -51,7 +51,7 @@ LockDisplay(dpy); *num_props_return = 0; if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) - goto cleanup; + goto cleanup_unlocked; GetReq(XIListProperties, req); req->reqType = info->codes->major_opcode; @@ -76,6 +76,7 @@ cleanup: UnlockDisplay(dpy); +cleanup_unlocked: SyncHandle(); return props; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIQueryDevice.c new/libXi-1.7.5/src/XIQueryDevice.c --- old/libXi-1.7.4/src/XIQueryDevice.c 2011-12-20 01:28:44.000000000 +0100 +++ new/libXi-1.7.5/src/XIQueryDevice.c 2014-11-03 06:28:35.000000000 +0100 @@ -50,7 +50,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1) - goto error; + goto error_unlocked; GetReq(XIQueryDevice, req); req->reqType = extinfo->codes->major_opcode; @@ -105,6 +105,7 @@ error: UnlockDisplay(dpy); +error_unlocked: SyncHandle(); *ndevices_return = -1; return NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIQueryVersion.c new/libXi-1.7.5/src/XIQueryVersion.c --- old/libXi-1.7.4/src/XIQueryVersion.c 2013-05-27 01:14:05.000000000 +0200 +++ new/libXi-1.7.5/src/XIQueryVersion.c 2014-11-03 06:28:35.000000000 +0100 @@ -41,10 +41,8 @@ XExtDisplayInfo *info = XInput_find_display(dpy); - LockDisplay(dpy); rc = _xiQueryVersion(dpy, major_inout, minor_inout, info); - UnlockDisplay(dpy); SyncHandle(); return rc; } @@ -55,6 +53,8 @@ xXIQueryVersionReq *req; xXIQueryVersionReply rep; + LockDisplay(dpy); + /* This could mean either a malloc problem, or supported version < XInput_2_0 */ if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) @@ -82,9 +82,13 @@ req->minor_version = *minor; if (!_XReply(dpy, (xReply*)&rep, 0, xTrue)) { + UnlockDisplay(dpy); return BadImplementation; } + *major = rep.major_version; *minor = rep.minor_version; + + UnlockDisplay(dpy); return Success; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XISelEv.c new/libXi-1.7.5/src/XISelEv.c --- old/libXi-1.7.4/src/XISelEv.c 2013-06-26 21:37:18.000000000 +0200 +++ new/libXi-1.7.5/src/XISelEv.c 2014-11-03 06:28:35.000000000 +0100 @@ -60,7 +60,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) { r = NoSuchExtension; - goto out; + goto out_unlocked; } for (i = 0; i < num_masks; i++) { @@ -114,6 +114,7 @@ free(buff); out: UnlockDisplay(dpy); +out_unlocked: SyncHandle(); return r; @@ -134,7 +135,7 @@ *num_masks_return = -1; LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, info) == -1) - goto out; + goto out_unlocked; GetReq(XIGetSelectedEvents, req); @@ -209,6 +210,8 @@ Xfree(mask_in); UnlockDisplay(dpy); + +out_unlocked: SyncHandle(); return mask_out; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XIint.h new/libXi-1.7.5/src/XIint.h --- old/libXi-1.7.4/src/XIint.h 2013-11-25 01:18:55.000000000 +0100 +++ new/libXi-1.7.5/src/XIint.h 2014-11-03 06:28:36.000000000 +0100 @@ -29,7 +29,6 @@ extern int _XiCheckExtInit(Display *, int, XExtDisplayInfo *); extern int _XiCheckVersion(XExtDisplayInfo *info, int version_index); -extern XExtensionVersion *_XiGetExtensionVersion(Display *, _Xconst char *, XExtDisplayInfo *); extern XExtensionVersion* _XiGetExtensionVersionRequest(Display *dpy, _Xconst char *name, int xi_opcode); extern Status _xiQueryVersion(Display *dpy, int*, int*, XExtDisplayInfo *); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XListDProp.c new/libXi-1.7.5/src/XListDProp.c --- old/libXi-1.7.4/src/XListDProp.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XListDProp.c 2014-11-03 06:28:35.000000000 +0100 @@ -51,7 +51,7 @@ LockDisplay(dpy); *nprops_return = 0; if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - goto cleanup; + return NULL; GetReq(ListDeviceProperties, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XOpenDev.c new/libXi-1.7.5/src/XOpenDev.c --- old/libXi-1.7.4/src/XOpenDev.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XOpenDev.c 2014-11-03 06:28:35.000000000 +0100 @@ -73,7 +73,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XDevice *) NoSuchExtension); + return NULL; GetReq(OpenDevice, req); req->reqType = info->codes->major_opcode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXi-1.7.4/src/XQueryDv.c new/libXi-1.7.5/src/XQueryDv.c --- old/libXi-1.7.4/src/XQueryDv.c 2013-05-24 03:46:37.000000000 +0200 +++ new/libXi-1.7.5/src/XQueryDv.c 2014-11-03 06:28:35.000000000 +0100 @@ -78,7 +78,7 @@ LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) - return ((XDeviceState *) NoSuchExtension); + return NULL; GetReq(QueryDeviceState, req); req->reqType = info->codes->major_opcode;
