ChangeLog                                                  |  134 ++++++-
 configure.ac                                               |   15 
 debian/changelog                                           |   19 +
 debian/control                                             |    8 
 debian/patches/bytes_overflow_64bit_upstream_0f5cfdc3136dd |   28 -
 debian/patches/series                                      |    1 
 include/X11/extensions/XRes.h                              |   79 ++++
 src/XRes.c                                                 |  238 ++++++++++++-
 8 files changed, 456 insertions(+), 66 deletions(-)

New commits:
commit 9a0ed26dc0c54b0ceff60962e3efa4c1d67f9004
Author: Drew Parsons <dpars...@debian.org>
Date:   Mon Nov 6 15:33:03 2017 +0800

    upload 2:1.2.0-2 to unstable

diff --git a/debian/changelog b/debian/changelog
index 07bf554..29881a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,12 @@
-libxres (2:1.2.0-1exp2) UNRELEASED; urgency=medium
+libxres (2:1.2.0-2) unstable; urgency=medium
 
+  * Team upload.
   * Build-Depends: libx11-dev (>= 2:1.6) to ensure _XEatDataWords is
     defined. See configure.ac (cf. upstream commit ae0ddaa9c96...)
   * Update debian/control VCS entries from git.debian.org to
     anonscm.debian.org
 
- -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 21:41:48 +0800
+ -- Drew Parsons <dpars...@debian.org>  Mon, 06 Nov 2017 15:32:34 +0800
 
 libxres (2:1.2.0-1exp1) experimental; urgency=medium
 

commit 148a01c3c20752cbaa24c580505b255a7728b861
Author: Drew Parsons <dpars...@debian.org>
Date:   Tue Oct 24 00:17:20 2017 +0800

    Update debian/control VCS entries
    
    from git.debian.org to anonscm.debian.org

diff --git a/debian/changelog b/debian/changelog
index ecd4438..07bf554 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ libxres (2:1.2.0-1exp2) UNRELEASED; urgency=medium
 
   * Build-Depends: libx11-dev (>= 2:1.6) to ensure _XEatDataWords is
     defined. See configure.ac (cf. upstream commit ae0ddaa9c96...)
+  * Update debian/control VCS entries from git.debian.org to
+    anonscm.debian.org
 
  -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 21:41:48 +0800
 
diff --git a/debian/control b/debian/control
index a809499..9911b6e 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,8 @@ Build-Depends:
  xutils-dev (>= 1:7.5+4),
 Standards-Version: 4.1.1
 Homepage: https://www.x.org
-Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxres
-Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxres.git
+Vcs-Git: git://anonscm.debian.org/pkg-xorg/lib/libxres
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xorg/lib/libxres.git
 
 Package: libxres1
 Section: libs

commit c0f8b2b225274200982b0d813d0cf19392c52829
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 21:49:02 2017 +0800

    Build-Depends: libx11-dev (>= 2:1.6) to ensure _XEatDataWords is defined.
    
    See configure.ac (cf. upstream commit ae0ddaa9c96...)

diff --git a/debian/changelog b/debian/changelog
index 7d4df65..ecd4438 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libxres (2:1.2.0-1exp2) UNRELEASED; urgency=medium
+
+  * Build-Depends: libx11-dev (>= 2:1.6) to ensure _XEatDataWords is
+    defined. See configure.ac (cf. upstream commit ae0ddaa9c96...)
+
+ -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 21:41:48 +0800
+
 libxres (2:1.2.0-1exp1) experimental; urgency=medium
 
   * Team upload.
diff --git a/debian/control b/debian/control
index feeb12d..a809499 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Cyril Brulebois <k...@debian.org>
 Build-Depends:
  dpkg-dev (>= 1.16.1),
  debhelper (>= 10),
- libx11-dev (>= 1:0.99.2),
+ libx11-dev (>= 2:1.6),
  libxext-dev (>= 1:0.99.1),
  x11proto-resource-dev,
  x11proto-xext-dev,

commit 745dc17cdad12c2dc3962b4e2f566fa17fc7e93d
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 20:33:50 2017 +0800

    upload 2:1.2.0-1exp1 to experimental

diff --git a/debian/changelog b/debian/changelog
index 4f95403..7d4df65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-libxres (2:1.2.0-1exp1) UNRELEASED; urgency=medium
+libxres (2:1.2.0-1exp1) experimental; urgency=medium
 
   * Team upload.
   * New upstream release.
     - applies debian patch bytes_overflow_64bit_upstream_0f5cfdc3136dd
   * Standards-Version: 4.1.1
 
- -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 19:49:21 +0800
+ -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 20:32:25 +0800
 
 libxres (2:1.0.7-3) unstable; urgency=medium
 

commit 04733d243e1cdc5c31aaeb1e7a430d7c744555e3
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 20:29:57 2017 +0800

    Standards-Version: 4.1.1

diff --git a/debian/changelog b/debian/changelog
index 4df5504..4f95403 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ libxres (2:1.2.0-1exp1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release.
     - applies debian patch bytes_overflow_64bit_upstream_0f5cfdc3136dd
+  * Standards-Version: 4.1.1
 
  -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 19:49:21 +0800
 
diff --git a/debian/control b/debian/control
index 071ac2a..feeb12d 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Build-Depends:
  automake,
  libtool,
  xutils-dev (>= 1:7.5+4),
-Standards-Version: 4.0.1
+Standards-Version: 4.1.1
 Homepage: https://www.x.org
 Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxres
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxres.git

commit 071fcbc5ca82f03dbdd40e9242efda5ae8f94d64
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 20:27:18 2017 +0800

    update ChangeLog from upstream 1.2.0 tarball

diff --git a/ChangeLog b/ChangeLog
index bfd4c59..863ce32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,76 @@
-commit b51a7b0ccf0d5ccb53fbd5d34ed8fe57603d2604
+commit 84b9156c7833dfd91c65d33542420ff4fe226948
+Author: Adam Jackson <a...@redhat.com>
+Date:   Wed Oct 11 11:11:01 2017 -0400
+
+    libXRes 1.2.0
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit 1bc34457619c0d9b94ebd1cadac53366da20fbe3
+Author: Mihail Konev <k....@ya.ru>
+Date:   Thu Jan 26 13:52:49 2017 +1000
+
+    autogen: add default patch prefix
+    
+    Signed-off-by: Mihail Konev <k....@ya.ru>
+
+commit e5fbb99729d460eda477bf6e299728bc47542ccb
+Author: Emil Velikov <emil.l.veli...@gmail.com>
+Date:   Mon Mar 9 12:00:52 2015 +0000
+
+    autogen.sh: use quoted string variables
+    
+    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
+    fall-outs, when they contain space.
+    
+    Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
+    Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+
+commit 16b2d184302d259a8481693285976045386fcc01
+Author: Peter Hutterer <peter.hutte...@who-t.net>
+Date:   Tue Jan 24 10:32:07 2017 +1000
+
+    autogen.sh: use exec instead of waiting for configure to finish
+    
+    Syncs the invocation of configure with the one from the server.
+    
+    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
+    Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
+
+commit ae0ddaa9c960aee1b7845da01270b00177f95f3d
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
-Date:   Thu May 30 17:51:12 2013 -0700
+Date:   Fri Nov 22 23:22:36 2013 -0800
 
-    libXres 1.0.7
+    Remove fallback for _XEatDataWords, require libX11 1.6 for it
+    
+    _XEatDataWords was orignally introduced with the May 2013 security
+    patches, and in order to ease the process of delivering those,
+    fallback versions of _XEatDataWords were included in the X extension
+    library patches so they could be applied to older versions that didn't
+    have libX11 1.6 yet.   Now that we're past that hurdle, we can drop
+    the fallbacks and just require libX11 1.6 for building new versions
+    of the extension libraries.
     
     Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
 
-commit ad156a716a324ee60362c8ba66a5ed8c835c219b
+commit 0f5cfdc3136dd8ef43800bda64f9d39e6b23b2e9
+Author: Julien Cristau <jcris...@debian.org>
+Date:   Sun Jun 30 20:09:49 2013 +0200
+
+    Compute number of bytes correctly in XResQueryClientPixmapBytes
+    
+    64-bit servers send the upper 32-bit in bytes_overflow.  We were
+    multiplying by 2^32 - 1 instead of 2^32 when putting things back
+    together.
+    
+    Debian bug#621702
+    
+    Reported-by: Kevin Ryde <use...@zip.com.au>
+    Signed-off-by: Julien Cristau <jcris...@debian.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com>
+
+commit f468184963e53feda848853c4aefd0197b2cc116
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Apr 12 23:36:13 2013 -0700
 
@@ -19,7 +83,7 @@ Date:   Fri Apr 12 23:36:13 2013 -0700
     Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com>
     Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
 
-commit 3ec2db9eeb9ba8fb561802b0c4b8bf79e321b7a2
+commit b053d215b80e721f9afdc5794e4f3f4f2aee0141
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Apr 12 23:36:13 2013 -0700
 
@@ -32,7 +96,7 @@ Date:   Fri Apr 12 23:36:13 2013 -0700
     Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com>
     Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
 
-commit 95b352b0f4a1ab1bc254e78adbc73cd65223ded4
+commit 69457711050ac3a53859ef11790a7ac815cd7d94
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Sat Apr 13 10:34:22 2013 -0700
 
@@ -42,7 +106,7 @@ Date:   Sat Apr 13 10:34:22 2013 -0700
     
     Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
 
-commit d54acff47096cf52a9b8e018a26f7165e1092eb5
+commit 83e7693515369d57dcd11c2bb1f03563f51bc500
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Jan 18 23:06:20 2013 -0800
 
@@ -58,7 +122,61 @@ Date:   Fri Jan 18 23:06:20 2013 -0800
     the current minimum level required to build X.
     
     Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
-    (cherry picked from commit 83e7693515369d57dcd11c2bb1f03563f51bc500)
+
+commit d9324b7d07294bb18e4902596a1b8ee387188364
+Author: Colin Walters <walt...@verbum.org>
+Date:   Wed Jan 4 17:37:06 2012 -0500
+
+    autogen.sh: Implement GNOME Build API
+    
+    http://people.gnome.org/~walters/docs/build-api.txt
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit 6d1f115422cde2bfca4b69caa395345f3ac454e7
+Author: Adam Jackson <a...@redhat.com>
+Date:   Tue Jan 15 14:28:48 2013 -0500
+
+    configure: Remove AM_MAINTAINER_MODE
+    
+    Signed-off-by: Adam Jackson <a...@redhat.com>
+
+commit f44f4e265ec3ab7ef87d6d7009ec079ba4c49336
+Author: Alan Coopersmith <alan.coopersm...@oracle.com>
+Date:   Mon Apr 23 18:57:48 2012 -0700
+
+    Bump version to 1.1.99.0 to reflect addition of 1.2 API
+    
+    As noted in configure.ac comment, we try to keep library version
+    based on the protocol version number, so since the protocol skipped
+    to 1.2, we'll do that with the library as well for simplicity's sake.
+    
+    Sets resourceproto requirement to version 1.2.0 since there were no
+    intermediate/snapshot versions between 1.1.2 & 1.2.0.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
+
+commit 01fc6f81f0a2935741dd1114aa3fa267d8be9095
+Author: Erkki Seppälä <erkki.sepp...@vincit.fi>
+Date:   Wed Dec 15 13:48:09 2010 +0200
+
+    Implemented second part of XResource extension v1.2: XResQueryResourceBytes
+    
+    Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi>
+    Reviewed-by: Rami Ylimäki <rami.ylim...@vincit.fi>
+    Reviewed-by: Tiago Vignatti <tiago.vigna...@nokia.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
+
+commit 0f38938a27df1f865dcdda35f4d2ef191092ba42
+Author: Erkki Seppälä <erkki.sepp...@vincit.fi>
+Date:   Mon Nov 29 12:43:51 2010 +0200
+
+    Implemented first part of XResource extension v1.2: XResQueryClientIds
+    
+    Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi>
+    Reviewed-by: Rami Ylimäki <rami.ylim...@vincit.fi>
+    Reviewed-by: Tiago Vignatti <tiago.vigna...@nokia.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
 
 commit e6e0e02e4bf764fa58798540793bdeb44a60cc7f
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>

commit 06e110c99b206b01d9d16f998f48101d70156a3e
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Sat Apr 13 10:34:22 2013 -0700

    Use _XEatDataWords to avoid overflow of rep.length shifting
    
    rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index 5e3703b..b829cc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,12 @@ XORG_CHECK_MALLOC_ZERO
 # Obtain compiler/linker options for depedencies
 PKG_CHECK_MODULES(XRES, [x11 >= 1.6] xext xextproto [resourceproto >= 1.2.0])
 
+# Check for _XEatDataWords function that may be patched into older Xlib release
+SAVE_LIBS="$LIBS"
+LIBS="$XRES_LIBS"
+AC_CHECK_FUNCS([_XEatDataWords])
+LIBS="$SAVE_LIBS"
+
 AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile

commit 8a657e6ad9aa0e72ab979065dee0d2fe32ebe214
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Thu May 30 17:51:12 2013 -0700

    libXres 1.0.7
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index b829cc1..5e3703b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,12 +50,6 @@ XORG_CHECK_MALLOC_ZERO
 # Obtain compiler/linker options for depedencies
 PKG_CHECK_MODULES(XRES, [x11 >= 1.6] xext xextproto [resourceproto >= 1.2.0])
 
-# Check for _XEatDataWords function that may be patched into older Xlib release
-SAVE_LIBS="$LIBS"
-LIBS="$XRES_LIBS"
-AC_CHECK_FUNCS([_XEatDataWords])
-LIBS="$SAVE_LIBS"
-
 AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile

commit 087c1abc49413b229c15fecd18fd15c7655c03a2
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Sat Apr 13 10:34:22 2013 -0700

    Use _XEatDataWords to avoid overflow of rep.length shifting
    
    rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index 5e3703b..b829cc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,12 @@ XORG_CHECK_MALLOC_ZERO
 # Obtain compiler/linker options for depedencies
 PKG_CHECK_MODULES(XRES, [x11 >= 1.6] xext xextproto [resourceproto >= 1.2.0])
 
+# Check for _XEatDataWords function that may be patched into older Xlib release
+SAVE_LIBS="$LIBS"
+LIBS="$XRES_LIBS"
+AC_CHECK_FUNCS([_XEatDataWords])
+LIBS="$SAVE_LIBS"
+
 AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile

commit 6610845a037cedae4a4e55a8adee5dae410bdd91
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 20:01:28 2017 +0800

    refresh patches
    
    bytes_overflow_64bit_upstream_0f5cfdc3136dd is applied upstream in
    1.2.0

diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 86e51a2..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname "$0"`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd "$srcdir"
-
-autoreconf -v --install || exit 1
-cd "$ORIGDIR" || exit $?
-
-git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
-    git config --local format.subjectPrefix "PATCH libXRes"
-
-if test -z "$NOCONFIGURE"; then
-    exec "$srcdir"/configure "$@"
-fi
diff --git a/debian/changelog b/debian/changelog
index 25e193c..4df5504 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libxres (2:1.2.0-1exp1) UNRELEASED; urgency=medium
 
   * Team upload.
   * New upstream release.
+    - applies debian patch bytes_overflow_64bit_upstream_0f5cfdc3136dd
 
  -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 19:49:21 +0800
 
diff --git a/debian/patches/bytes_overflow_64bit_upstream_0f5cfdc3136dd 
b/debian/patches/bytes_overflow_64bit_upstream_0f5cfdc3136dd
deleted file mode 100644
index 5e66dda..0000000
--- a/debian/patches/bytes_overflow_64bit_upstream_0f5cfdc3136dd
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0f5cfdc3136dd8ef43800bda64f9d39e6b23b2e9 Mon Sep 17 00:00:00 2001
-From: Julien Cristau <jcris...@debian.org>
-Date: Sun, 30 Jun 2013 20:09:49 +0200
-Subject: Compute number of bytes correctly in XResQueryClientPixmapBytes
-
-64-bit servers send the upper 32-bit in bytes_overflow.  We were
-multiplying by 2^32 - 1 instead of 2^32 when putting things back
-together.
-
-Debian bug#621702
-
-Reported-by: Kevin Ryde <use...@zip.com.au>
-Signed-off-by: Julien Cristau <jcris...@debian.org>
-Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com>
-
-Index: libxres/src/XRes.c
-===================================================================
---- libxres.orig/src/XRes.c
-+++ libxres/src/XRes.c
-@@ -239,7 +239,7 @@ Status XResQueryClientPixmapBytes (
-     }
- 
- #ifdef LONG64
--    *bytes = (rep.bytes_overflow * 4294967295) + rep.bytes;
-+    *bytes = (rep.bytes_overflow * 4294967296UL) + rep.bytes;
- #else
-     *bytes = rep.bytes_overflow ? 0xffffffff : rep.bytes;
- #endif
diff --git a/debian/patches/series b/debian/patches/series
index 3c9a1a7..a45425d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 autogen.sh-install
-bytes_overflow_64bit_upstream_0f5cfdc3136dd

commit 2da3913abc3f90a8d1253e7546822a60f745180e
Author: Drew Parsons <dpars...@debian.org>
Date:   Sat Oct 21 19:55:14 2017 +0800

    prepare for new upstream release

diff --git a/debian/changelog b/debian/changelog
index 27361ce..25e193c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libxres (2:1.2.0-1exp1) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * New upstream release.
+
+ -- Drew Parsons <dpars...@debian.org>  Sat, 21 Oct 2017 19:49:21 +0800
+
 libxres (2:1.0.7-3) unstable; urgency=medium
 
   * Team upload.

commit 47f8ced17f5ef0a1f1539fd8837cd8f47aa0eb6e
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Sat Apr 13 10:34:22 2013 -0700

    Use _XEatDataWords to avoid overflow of rep.length shifting
    
    rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index 5e3703b..b829cc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,12 @@ XORG_CHECK_MALLOC_ZERO
 # Obtain compiler/linker options for depedencies
 PKG_CHECK_MODULES(XRES, [x11 >= 1.6] xext xextproto [resourceproto >= 1.2.0])
 
+# Check for _XEatDataWords function that may be patched into older Xlib release
+SAVE_LIBS="$LIBS"
+LIBS="$XRES_LIBS"
+AC_CHECK_FUNCS([_XEatDataWords])
+LIBS="$SAVE_LIBS"
+
 AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile

commit 84b9156c7833dfd91c65d33542420ff4fe226948
Author: Adam Jackson <a...@redhat.com>
Date:   Wed Oct 11 11:11:01 2017 -0400

    libXRes 1.2.0
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/configure.ac b/configure.ac
index b082de8..5e3703b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ([2.60])
 # digit in the version number to track changes which don't affect the
 # protocol, so XRes version l.n.m corresponds to protocol version l.n
 #
-AC_INIT([libXres], [1.1.99.0],
+AC_INIT([libXres], [1.2.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXres])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 1bc34457619c0d9b94ebd1cadac53366da20fbe3
Author: Mihail Konev <k....@ya.ru>
Date:   Thu Jan 26 13:52:49 2017 +1000

    autogen: add default patch prefix
    
    Signed-off-by: Mihail Konev <k....@ya.ru>

diff --git a/autogen.sh b/autogen.sh
index 0006de8..86e51a2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,9 @@ cd "$srcdir"
 autoreconf -v --install || exit 1
 cd "$ORIGDIR" || exit $?
 
+git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
+    git config --local format.subjectPrefix "PATCH libXRes"
+
 if test -z "$NOCONFIGURE"; then
     exec "$srcdir"/configure "$@"
 fi

commit e5fbb99729d460eda477bf6e299728bc47542ccb
Author: Emil Velikov <emil.l.veli...@gmail.com>
Date:   Mon Mar 9 12:00:52 2015 +0000

    autogen.sh: use quoted string variables
    
    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
    fall-outs, when they contain space.
    
    Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>

diff --git a/autogen.sh b/autogen.sh
index fd9c59a..0006de8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,14 @@
 #! /bin/sh
 
-srcdir=`dirname $0`
+srcdir=`dirname "$0"`
 test -z "$srcdir" && srcdir=.
 
 ORIGDIR=`pwd`
-cd $srcdir
+cd "$srcdir"
 
 autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
+cd "$ORIGDIR" || exit $?
 
 if test -z "$NOCONFIGURE"; then
-    exec $srcdir/configure "$@"
+    exec "$srcdir"/configure "$@"
 fi

commit 16b2d184302d259a8481693285976045386fcc01
Author: Peter Hutterer <peter.hutte...@who-t.net>
Date:   Tue Jan 24 10:32:07 2017 +1000

    autogen.sh: use exec instead of waiting for configure to finish
    
    Syncs the invocation of configure with the one from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
    Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

diff --git a/autogen.sh b/autogen.sh
index fc34bd5..fd9c59a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,5 +10,5 @@ autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
 if test -z "$NOCONFIGURE"; then
-    $srcdir/configure "$@"
+    exec $srcdir/configure "$@"
 fi

commit ae0ddaa9c960aee1b7845da01270b00177f95f3d
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Fri Nov 22 23:22:36 2013 -0800

    Remove fallback for _XEatDataWords, require libX11 1.6 for it
    
    _XEatDataWords was orignally introduced with the May 2013 security
    patches, and in order to ease the process of delivering those,
    fallback versions of _XEatDataWords were included in the X extension
    library patches so they could be applied to older versions that didn't
    have libX11 1.6 yet.   Now that we're past that hurdle, we can drop
    the fallbacks and just require libX11 1.6 for building new versions
    of the extension libraries.
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index f68b689..b082de8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,13 +48,7 @@ XORG_DEFAULT_OPTIONS
 XORG_CHECK_MALLOC_ZERO
 
 # Obtain compiler/linker options for depedencies
-PKG_CHECK_MODULES(XRES, x11 xext xextproto [resourceproto >= 1.2.0])
-
-# Check for _XEatDataWords function that may be patched into older Xlib release
-SAVE_LIBS="$LIBS"
-LIBS="$XRES_LIBS"
-AC_CHECK_FUNCS([_XEatDataWords])
-LIBS="$SAVE_LIBS"
+PKG_CHECK_MODULES(XRES, [x11 >= 1.6] xext xextproto [resourceproto >= 1.2.0])
 
 AC_CONFIG_FILES([Makefile
                src/Makefile
diff --git a/src/XRes.c b/src/XRes.c
index 89fab82..2bee277 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -15,17 +15,6 @@
 #include <assert.h>
 #include <limits.h>
 
-#ifndef HAVE__XEATDATAWORDS
-static inline void _XEatDataWords(Display *dpy, unsigned long n)
-{
-# ifndef LONG64
-    if (n >= (ULONG_MAX >> 2))
-        _XIOError(dpy);
-# endif
-    _XEatData (dpy, n << 2);
-}
-#endif
-
 static XExtensionInfo _xres_ext_info_data;
 static XExtensionInfo *xres_ext_info = &_xres_ext_info_data;
 static const char *xres_extension_name = XRES_NAME;

commit 0f5cfdc3136dd8ef43800bda64f9d39e6b23b2e9
Author: Julien Cristau <jcris...@debian.org>
Date:   Sun Jun 30 20:09:49 2013 +0200

    Compute number of bytes correctly in XResQueryClientPixmapBytes
    
    64-bit servers send the upper 32-bit in bytes_overflow.  We were
    multiplying by 2^32 - 1 instead of 2^32 when putting things back
    together.
    
    Debian bug#621702
    
    Reported-by: Kevin Ryde <use...@zip.com.au>
    Signed-off-by: Julien Cristau <jcris...@debian.org>
    Reviewed-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/src/XRes.c b/src/XRes.c
index 51e905f..89fab82 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -240,7 +240,7 @@ Status XResQueryClientPixmapBytes (
     }
 
 #ifdef LONG64
-    *bytes = (rep.bytes_overflow * 4294967295) + rep.bytes;
+    *bytes = (rep.bytes_overflow * 4294967296UL) + rep.bytes;
 #else
     *bytes = rep.bytes_overflow ? 0xffffffff : rep.bytes;
 #endif

commit f468184963e53feda848853c4aefd0197b2cc116
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Fri Apr 12 23:36:13 2013 -0700

    integer overflow in XResQueryClientResources() [CVE-2013-1988 2/2]
    
    The CARD32 rep.num_types needs to be bounds checked before multiplying
    by sizeof(XResType) to avoid integer overflow leading to underallocation
    and writing data from the network past the end of the allocated buffer.
    
    Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/src/XRes.c b/src/XRes.c
index c989985..51e905f 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -187,7 +187,12 @@ Status XResQueryClientResources (
     }
 
     if(rep.num_types) {
-        if((typs = Xmalloc(sizeof(XResType) * rep.num_types))) {
+        if (rep.num_types < (INT_MAX / sizeof(XResType)))
+            typs = Xmalloc(sizeof(XResType) * rep.num_types);
+        else
+            typs = NULL;
+
+        if (typs != NULL) {
             xXResType scratch;
             int i;
 

commit b053d215b80e721f9afdc5794e4f3f4f2aee0141
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Fri Apr 12 23:36:13 2013 -0700

    integer overflow in XResQueryClients() [CVE-2013-1988 1/2]
    
    The CARD32 rep.num_clients needs to be bounds checked before multiplying
    by sizeof(XResClient) to avoid integer overflow leading to underallocation
    and writing data from the network past the end of the allocated buffer.
    
    Reported-by: Ilja Van Sprundel <ivansprun...@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/src/XRes.c b/src/XRes.c
index 1ab1db8..c989985 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -130,7 +130,12 @@ Status XResQueryClients (
     }
 
     if(rep.num_clients) {
-        if((clnts = Xmalloc(sizeof(XResClient) * rep.num_clients))) {
+        if (rep.num_clients < (INT_MAX / sizeof(XResClient)))
+            clnts = Xmalloc(sizeof(XResClient) * rep.num_clients);
+        else
+            clnts = NULL;
+
+        if (clnts != NULL) {
             xXResClient scratch;
             int i;
 

commit 69457711050ac3a53859ef11790a7ac815cd7d94
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Sat Apr 13 10:34:22 2013 -0700

    Use _XEatDataWords to avoid overflow of rep.length shifting
    
    rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index 90205cc..f68b689 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,12 @@ XORG_CHECK_MALLOC_ZERO
 # Obtain compiler/linker options for depedencies
 PKG_CHECK_MODULES(XRES, x11 xext xextproto [resourceproto >= 1.2.0])
 
+# Check for _XEatDataWords function that may be patched into older Xlib release
+SAVE_LIBS="$LIBS"
+LIBS="$XRES_LIBS"
+AC_CHECK_FUNCS([_XEatDataWords])
+LIBS="$SAVE_LIBS"
+
 AC_CONFIG_FILES([Makefile
                src/Makefile
                man/Makefile
diff --git a/src/XRes.c b/src/XRes.c
index 1744196..1ab1db8 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -13,6 +13,18 @@
 #include <X11/extensions/XResproto.h>
 #include <X11/extensions/XRes.h>
 #include <assert.h>
+#include <limits.h>
+
+#ifndef HAVE__XEATDATAWORDS
+static inline void _XEatDataWords(Display *dpy, unsigned long n)
+{
+# ifndef LONG64
+    if (n >= (ULONG_MAX >> 2))
+        _XIOError(dpy);
+# endif
+    _XEatData (dpy, n << 2);
+}
+#endif
 
 static XExtensionInfo _xres_ext_info_data;
 static XExtensionInfo *xres_ext_info = &_xres_ext_info_data;
@@ -131,7 +143,7 @@ Status XResQueryClients (
             *num_clients = rep.num_clients;
             result = 1;
         } else {
-            _XEatData(dpy, rep.length << 2);
+            _XEatDataWords(dpy, rep.length);
         }
     }
 
@@ -183,7 +195,7 @@ Status XResQueryClientResources (
             *num_types = rep.num_types;
             result = 1;
         } else {
-            _XEatData(dpy, rep.length << 2);
+            _XEatDataWords(dpy, rep.length);
         }
     }
 

commit 83e7693515369d57dcd11c2bb1f03563f51bc500
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Fri Jan 18 23:06:20 2013 -0800

    Replace deprecated Automake INCLUDES variable with AM_CPPFLAGS
    
    Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html
    
      - Support for the long-deprecated INCLUDES variable will be removed
        altogether in Automake 1.14.  The AM_CPPFLAGS variable should be
        used instead.
    
    This variable was deprecated in Automake releases prior to 1.10, which is
    the current minimum level required to build X.
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index fd508da..bf66d68 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,7 +10,7 @@ AM_CFLAGS = \
        $(XRES_CFLAGS) \
        $(MALLOC_ZERO_CFLAGS)
 
-INCLUDES = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include
 
 libXRes_la_LDFLAGS = -version-number 1:0:0 -no-undefined
 

commit d9324b7d07294bb18e4902596a1b8ee387188364
Author: Colin Walters <walt...@verbum.org>
Date:   Wed Jan 4 17:37:06 2012 -0500

    autogen.sh: Implement GNOME Build API
    
    http://people.gnome.org/~walters/docs/build-api.txt
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/autogen.sh b/autogen.sh
index 904cd67..fc34bd5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,4 +9,6 @@ cd $srcdir
 autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
-$srcdir/configure --enable-maintainer-mode "$@"
+if test -z "$NOCONFIGURE"; then
+    $srcdir/configure "$@"
+fi

commit 6d1f115422cde2bfca4b69caa395345f3ac454e7
Author: Adam Jackson <a...@redhat.com>
Date:   Tue Jan 15 14:28:48 2013 -0500

    configure: Remove AM_MAINTAINER_MODE
    
    Signed-off-by: Adam Jackson <a...@redhat.com>

diff --git a/configure.ac b/configure.ac
index 0079857..90205cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,6 @@ AC_CONFIG_HEADERS([config.h])
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
 
 # Initialize libtool
 AC_PROG_LIBTOOL

commit f44f4e265ec3ab7ef87d6d7009ec079ba4c49336
Author: Alan Coopersmith <alan.coopersm...@oracle.com>
Date:   Mon Apr 23 18:57:48 2012 -0700

    Bump version to 1.1.99.0 to reflect addition of 1.2 API
    
    As noted in configure.ac comment, we try to keep library version
    based on the protocol version number, so since the protocol skipped
    to 1.2, we'll do that with the library as well for simplicity's sake.
    
    Sets resourceproto requirement to version 1.2.0 since there were no
    intermediate/snapshot versions between 1.1.2 & 1.2.0.
    
    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>

diff --git a/configure.ac b/configure.ac
index bc4e8a6..0079857 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_PREREQ([2.60])
 # digit in the version number to track changes which don't affect the
 # protocol, so XRes version l.n.m corresponds to protocol version l.n
 #
-AC_INIT([libXres], [1.0.6],
+AC_INIT([libXres], [1.1.99.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXres])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
@@ -48,12 +48,8 @@ XORG_MACROS_VERSION(1.8)
 XORG_DEFAULT_OPTIONS
 XORG_CHECK_MALLOC_ZERO

Reply via email to