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

libxdmcp: Changes to 'debian-unstable'



 .gitignore                      |    1 
 Array.c                         |   87 ++++++++++++++++------------
 ChangeLog                       |  123 ++++++++++++++++++++++++++++++++++++++++
 Fill.c                          |   22 -------
 Flush.c                         |   17 -----
 Key.c                           |   10 +++
 Makefile.am                     |    2 
 autogen.sh                      |    4 -
 configure.ac                    |   20 ++++--
 debian/changelog                |   10 +++
 debian/compat                   |    2 
 debian/control                  |    9 +-
 debian/rules                    |  100 +++++---------------------------
 debian/upstream/signing-key.asc |   60 +++++++++++++++++++
 debian/watch                    |    1 
 include/X11/Xdmcp.h             |    2 
 test/Array.c                    |   92 +++++++++++++++++++++++++++++
 test/Makefile.am                |   13 ++++
 18 files changed, 404 insertions(+), 171 deletions(-)

New commits:
commit 891e7aa4664f498815f0484a1951a435e7cc78e7
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:16:15 2015 +0200

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index c20f95e..19dcb01 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
+libxdmcp (1:1.1.2-1) unstable; urgency=medium
 
   * Let uscan verify tarball signatures.
   * New upstream release.
@@ -6,7 +6,7 @@ libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
   * Disable silent build rules.
   * Remove Cyril from Uploaders.
 
- -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:02:30 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:16:08 +0200
 
 libxdmcp (1:1.1.1-1) unstable; urgency=low
 

commit 3d9db166886285677dbcc5db90212300175f9c29
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:13:50 2015 +0200

    Remove Cyril from Uploaders.

diff --git a/debian/changelog b/debian/changelog
index 0a5bb14..c20f95e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
   * New upstream release.
   * Switch to dh with the autoreconf and quilt addons.
   * Disable silent build rules.
+  * Remove Cyril from Uploaders.
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:02:30 +0200
 
diff --git a/debian/control b/debian/control
index a8fba5a..2ede6ff 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,6 @@ Source: libxdmcp
 Section: x11
 Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
  debhelper (>= 9),
  dh-autoreconf,

commit 79a2fc4c2093ed90372969e6dd61d36fdead9037
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:13:31 2015 +0200

    Disable silent build rules.

diff --git a/debian/changelog b/debian/changelog
index 0ad6dfb..0a5bb14 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
   * Let uscan verify tarball signatures.
   * New upstream release.
   * Switch to dh with the autoreconf and quilt addons.
+  * Disable silent build rules.
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:02:30 +0200
 
diff --git a/debian/rules b/debian/rules
index 0b7c525..487e3a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,7 @@ build:
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
+		--disable-silent-rules \
 		--with-xmlto \
 		--without-fop
 

commit 215385254e493487452daae262cb76973591c7a8
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:12:57 2015 +0200

    Switch to dh with the autoreconf and quilt addons.

diff --git a/debian/changelog b/debian/changelog
index 5ebd9a6..0ad6dfb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
 
   * Let uscan verify tarball signatures.
   * New upstream release.
+  * Switch to dh with the autoreconf and quilt addons.
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:02:30 +0200
 
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 35e6b6a..a8fba5a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,14 +4,18 @@ Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
- debhelper (>= 8.1.3),
+ debhelper (>= 9),
+ dh-autoreconf,
+ quilt,
  pkg-config,
  x11proto-core-dev,
  automake,
  libtool,
  xutils-dev (>= 1:7.5+4),
 # doc:
- xmlto, xorg-sgml-doctools (>= 1:1.5), w3m,
+ xmlto,
+ xorg-sgml-doctools (>= 1:1.5),
+ w3m,
 Standards-Version: 3.9.2
 Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxdmcp
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxdmcp.git
diff --git a/debian/rules b/debian/rules
index 4a86a22..0b7c525 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,95 +10,28 @@
 # set this to the name of the main shlib's binary package
 PACKAGE = libxdmcp6
 
-include debian/xsfbs/xsfbs.mk
+.PHONY: build
+build:
+	dh build --with quilt,autoreconf --builddirectory=build/ --parallel
 
-CFLAGS = -Wall -g
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-	MAKEFLAGS += -j$(NUMJOBS)
-endif
+%:
+	dh $@ --with quilt,autoreconf --builddirectory=build/ --parallel
 
-DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-	confflags += --build=$(DEB_HOST_GNU_TYPE)
-else
-	confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-endif
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--with-xmlto \
+		--without-fop
 
-
-build: build-indep build-arch
-build-indep:
-build-arch: build-stamp
-.PHONY: build build-indep build-arch
-
-build-stamp:
-	dh_testdir
-	autoreconf -vfi
-	mkdir -p build
-	cd build && \
-	../configure --prefix=/usr --mandir=\$${prefix}/share/man \
-	             --infodir=\$${prefix}/share/info $(confflags) \
-	             --with-xmlto --without-fop \
-	             --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
-	             CFLAGS="$(CFLAGS)" 
-	cd build && $(MAKE)
-	>$@
-
-clean:
-	dh_testdir
-	rm -f build-stamp
-
-	rm -f config.cache config.log config.status
-	rm -f */config.cache */config.log */config.status
-	rm -f conftest* */conftest*
-	rm -rf autom4te.cache */autom4te.cache
-	rm -rf build
-	rm -f aclocal.m4 config.guess config.h.in config.sub configure
-	rm -f depcomp install-sh ltmain.sh missing mkinstalldirs
-	find -name Makefile.in -delete
-
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-
-	cd build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+override_dh_auto_install:
+	dh_auto_install
 	find debian/tmp/usr/share/doc/libXdmcp -name '*.xml' -delete
 
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
+override_dh_install:
+	dh_install --fail-missing --exclude=libXdmcp.la --exclude .html --exclude .css --exclude .db
 
-	dh_installdocs
-	dh_install --sourcedir=debian/tmp --fail-missing --exclude=libXdmcp.la --exclude .html --exclude .css --exclude .db
-	dh_installchangelogs ChangeLog
-	dh_link
+override_dh_strip:
 	dh_strip -p$(PACKAGE) --dbg-package=$(PACKAGE)-dbg
 	dh_strip -N$(PACKAGE)
-	dh_compress
-	dh_fixperms
-	dh_makeshlibs --add-udeb=$(PACKAGE)-udeb
-	dh_shlibdeps
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
 
-# Build architecture-independent files here.
-binary-indep: build install
-# Nothing to do
-
-binary: binary-indep binary-arch
-.PHONY: clean binary-indep binary-arch binary install
+override_dh_makeshlibs:
+	dh_makeshlibs --add-udeb=$(PACKAGE)-udeb

commit 9c52594412c5bd5803fbe8a483081a7c882f7df0
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:02:47 2015 +0200

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index 0ed01a1..dfdaad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,126 @@
+commit 0c09444d276fbf46a0e8b427a4f6a325d0625742
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Mar 21 09:39:14 2015 -0700
+
+    libXdmcp 1.1.2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9f4cac7656b221ce2a8f97e7bd31e5e23126d001
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Jan 17 10:37:09 2015 -0800
+
+    Add AC_USE_SYSTEM_EXTENSIONS to expose arc4random() interfaces in headers
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat May 31 21:39:32 2014 -0700
+
+    autogen.sh: Honor NOCONFIGURE=1
+    
+    See http://people.gnome.org/~walters/docs/build-api.txt
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit da9a25b208035448867f97cd92f3aed4b5bc53a9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat May 31 21:38:41 2014 -0700
+
+    configure: Drop AM_MAINTAINER_MODE
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 089081dca4ba3598c6f9bf401c029378943b5854
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat May 25 10:18:33 2013 -0700
+
+    Also reject requests to allocate negative sized amounts of memory
+    
+    Since the API is defined with size as a signed int, deal with it.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2da1bcb656febdab9345f1fec31c974fd7b409bc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri May 24 23:19:23 2013 -0700
+
+    Ensure ARRAYofARRAY8 pointers are initialized to NULL
+    
+    Use calloc for the array of pointers to ensure pointers are cleared out
+    so we don't try to free garbage if XdmcpDisposeARRAYofARRAY8 is called
+    before the caller sets them to valid pointers.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 787c4c79be18373f58aeaf2fe543f30fe3af2bd1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri May 24 22:58:41 2013 -0700
+
+    Ensure ARRAY* structs are zero'ed out when oversize values are passed
+    
+    Previous fix missed a case in which we returned failure, but didn't
+    fill in the data pointer & size values.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9089ae455f9df222aa85bbbcb4526874c0d97099
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri May 24 22:24:55 2013 -0700
+
+    Add unit tests for Array allocation functions
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 66514a4af7eaa47e8718434356d7efce95e570cf
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Aug 4 10:42:57 2013 +0200
+
+    Use arc4random when available to produce the XDM-AUTHENTICATION1 key
+    
+    arc4random() and associated functions can be found in libbsd on
+    GNU/Linux systems.
+    
+    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0b443c1b769b9c9a3b45b4252afe07e18b709ff4
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Apr 19 15:16:51 2013 -0700
+
+    Make XdmcpCopyARRAY8 call XdmcpAllocARRAY8 instead of replicating it
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1222f974442f3d419664be4faca576f5f1457666
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Apr 2 00:07:54 2013 -0700
+
+    Ensure ARRAY* structs are zero'ed out when allocation fails
+    
+    In the past some callers forgot to either initialize themselves or to
+    check the return values, so could try to read or write to uninitialized
+    pointers - we set the pointer to NULL & the size to 0 to avoid that.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ca65a92405500393f09d34388edbbf6350e6c146
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Dec 26 23:39:58 2012 -0800
+
+    Remove unused TLI ("STREAMSCONN") code from libXdmcp
+    
+    Has never been converted to build in modular builds, so has been unusable
+    since X11R7.0 release in 2005.  All known platforms with TLI/XTI support
+    that X11R7 & later releases run on also have (and mostly prefer) BSD
+    socket support for their networking API.
+    
+    Mostly performed via "unifdef -USTREAMSCONN", followed by manual cleanup.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit 60aa228de59270fd1b6d838d80095ac00da53342
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Wed Mar 7 19:46:26 2012 -0800
diff --git a/debian/changelog b/debian/changelog
index c0654cf..5ebd9a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-libxdmcp (1:1.1.1-2) UNRELEASED; urgency=medium
+libxdmcp (1:1.1.2-1) UNRELEASED; urgency=medium
 
   * Let uscan verify tarball signatures.
+  * New upstream release.
 
- -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:01:41 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:02:30 +0200
 
 libxdmcp (1:1.1.1-1) unstable; urgency=low
 

commit af6e4c57e3d73b8a6cf24aadf85cb5444b9c2513
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Apr 26 17:02:05 2015 +0200

    Let uscan verify tarball signatures.

diff --git a/debian/changelog b/debian/changelog
index cc53e52..c0654cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libxdmcp (1:1.1.1-2) UNRELEASED; urgency=medium
+
+  * Let uscan verify tarball signatures.
+
+ -- Julien Cristau <jcristau@debian.org>  Sun, 26 Apr 2015 17:01:41 +0200
+
 libxdmcp (1:1.1.1-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..863981f
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,60 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQGiBEab+moRBACDH5yKqS3wcc5bdxY7PBNuwKvF5TKMfagmSvuRDtZjjIIWaA/n
+Z1KboV9Gq5g7kP7+Kfu+Qgd8u65eVsWwmPW10fXvj3aCU53glx2EdGdrHcgiyH2g
+EQfPiyBw+trIppWFRV0IDXSLMA1FNC92t2nSG/VFHaPTVwcgkIRSfcXDvwCglGdE
+a6f4uLqoNHP+m4yYnzapFuMD/R4+2AJDAvEWKDdYCGZzlawjAmmWyXrmT7/C/mx9
+8qUR473l4buXjHgDkkXXlHqdzil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oA+Dd5ZFqx9nTi4wBjfVYGCPsleq59K8kQCYx1Cn
+lZcq630ITy9dB/aHCQry2gCbBwZ2Rsf9kr05S8uLhlwW3vRSvRs=
+=tc6G
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/debian/watch b/debian/watch
index 73de3ae..938636f 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 #git=git://anongit.freedesktop.org/xorg/lib/libXdmcp
 version=3
+opts=pgpsigurlmangle=s/$/.sig/ \
 http://xorg.freedesktop.org/releases/individual/lib/ libXdmcp-(.*)\.tar\.gz

commit 0c09444d276fbf46a0e8b427a4f6a325d0625742
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Mar 21 09:39:14 2015 -0700

    libXdmcp 1.1.2
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index d117aa1..608bab9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXdmcp], [1.1.1],
+AC_INIT([libXdmcp], [1.1.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXdmcp])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])

commit 9f4cac7656b221ce2a8f97e7bd31e5e23126d001
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jan 17 10:37:09 2015 -0800

    Add AC_USE_SYSTEM_EXTENSIONS to expose arc4random() interfaces in headers
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index cf6b309..d117aa1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,10 @@ AC_INIT([libXdmcp], [1.1.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXdmcp])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
+# to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])

commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat May 31 21:39:32 2014 -0700

    autogen.sh: Honor NOCONFIGURE=1
    
    See http://people.gnome.org/~walters/docs/build-api.txt
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

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

commit da9a25b208035448867f97cd92f3aed4b5bc53a9
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat May 31 21:38:41 2014 -0700

    configure: Drop AM_MAINTAINER_MODE
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/autogen.sh b/autogen.sh
index 904cd67..354f254 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,4 +9,4 @@ cd $srcdir
 autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
-$srcdir/configure --enable-maintainer-mode "$@"
+$srcdir/configure "$@"
diff --git a/configure.ac b/configure.ac
index 4e85650..cf6b309 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,6 @@ AC_CONFIG_HEADERS([config.h])
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
 
 # Initialize libtool
 AC_LIBTOOL_WIN32_DLL

commit 089081dca4ba3598c6f9bf401c029378943b5854
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat May 25 10:18:33 2013 -0700

    Also reject requests to allocate negative sized amounts of memory
    
    Since the API is defined with size as a signed int, deal with it.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Array.c b/Array.c
index cb57d89..6b9b617 100644
--- a/Array.c
+++ b/Array.c
@@ -65,7 +65,7 @@ int
 XdmcpAllocARRAY8 (ARRAY8Ptr array, int length)
 {
     /* length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) */
-    if (length > UINT16_MAX)
+    if ((length > UINT16_MAX) || (length < 0))
         array->data = NULL;
     else
         array->data = xmalloc(length * sizeof (CARD8));
@@ -82,7 +82,7 @@ int
 XdmcpAllocARRAY16 (ARRAY16Ptr array, int length)
 {
     /* length defined in ARRAY16 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
         array->data = NULL;
     else
         array->data = xmalloc(length * sizeof (CARD16));
@@ -99,7 +99,7 @@ int
 XdmcpAllocARRAY32 (ARRAY32Ptr array, int length)
 {
     /* length defined in ARRAY32 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
         array->data = NULL;
     else
         array->data = xmalloc(length * sizeof (CARD32));
@@ -116,7 +116,7 @@ int
 XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
 {
     /* length defined in ARRAYofARRAY8 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
         array->data = NULL;
     else
         /*
@@ -159,7 +159,7 @@ XdmcpReallocARRAY8 (ARRAY8Ptr array, int length)
     CARD8Ptr	newData;
 
     /* length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) */
-    if (length > UINT16_MAX)
+    if ((length > UINT16_MAX) || (length < 0))
 	return FALSE;
 
     newData = (CARD8Ptr) xrealloc(array->data, length * sizeof (CARD8));
@@ -176,7 +176,7 @@ XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
     ARRAY8Ptr	newData;
 
     /* length defined in ARRAYofARRAY8 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
 	return FALSE;
 
     newData = (ARRAY8Ptr) xrealloc(array->data, length * sizeof (ARRAY8));
@@ -196,7 +196,7 @@ XdmcpReallocARRAY16 (ARRAY16Ptr array, int length)
     CARD16Ptr	newData;
 
     /* length defined in ARRAY16 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
 	return FALSE;
     newData = (CARD16Ptr) xrealloc(array->data, length * sizeof (CARD16));
     if (!newData)
@@ -212,7 +212,7 @@ XdmcpReallocARRAY32 (ARRAY32Ptr array, int length)
     CARD32Ptr	newData;
 
     /* length defined in ARRAY32 struct is a CARD8 */
-    if (length > UINT8_MAX)
+    if ((length > UINT8_MAX) || (length < 0))
 	return FALSE;
 
     newData = (CARD32Ptr) xrealloc(array->data, length * sizeof (CARD32));
diff --git a/test/Array.c b/test/Array.c
index b246ba8..786fade 100644
--- a/test/Array.c
+++ b/test/Array.c
@@ -52,6 +52,10 @@ TestAllocOversizeArrays(void)
     TestAllocOversize(ARRAY16, UINT8_MAX + 1);
     TestAllocOversize(ARRAY32, UINT8_MAX + 1);
     TestAllocOversize(ARRAYofARRAY8, UINT8_MAX + 1);
+    TestAllocOversize(ARRAY8, -1);
+    TestAllocOversize(ARRAY16, -1);
+    TestAllocOversize(ARRAY32, -1);
+    TestAllocOversize(ARRAYofARRAY8, -1);
 }
 
 static void

commit 2da1bcb656febdab9345f1fec31c974fd7b409bc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 24 23:19:23 2013 -0700

    Ensure ARRAYofARRAY8 pointers are initialized to NULL
    
    Use calloc for the array of pointers to ensure pointers are cleared out
    so we don't try to free garbage if XdmcpDisposeARRAYofARRAY8 is called
    before the caller sets them to valid pointers.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Array.c b/Array.c
index c1456e1..cb57d89 100644
--- a/Array.c
+++ b/Array.c
@@ -44,6 +44,15 @@ xmalloc(size_t size)
 }
 
 /*
+ * This variant of calloc does not return NULL if zero count is passed into.
+ */
+static void *
+xcalloc(size_t n, size_t size)
+{
+    return calloc(n ? n : 1, size);
+}
+
+/*
  * This variant of realloc does not return NULL if zero size is passed into
  */
 static void *
@@ -110,7 +119,12 @@ XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
     if (length > UINT8_MAX)
         array->data = NULL;
     else
-        array->data = xmalloc(length * sizeof (ARRAY8));
+        /*
+         * Use calloc to ensure the pointers are cleared out so we
+         * don't try to free garbage if XdmcpDisposeARRAYofARRAY8()
+         * is called before the caller sets them to valid pointers.
+         */
+        array->data = xcalloc(length, sizeof (ARRAY8));
 
     if (array->data == NULL) {
 	array->length = 0;
@@ -168,6 +182,9 @@ XdmcpReallocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
     newData = (ARRAY8Ptr) xrealloc(array->data, length * sizeof (ARRAY8));
     if (!newData)
 	return FALSE;
+    if (length > array->length)
+        memset(newData + array->length, 0,
+               (length - array->length) * sizeof (ARRAY8));
     array->length = (CARD8) length;
     array->data = newData;
     return TRUE;
diff --git a/test/Array.c b/test/Array.c
index 0f3430e..b246ba8 100644
--- a/test/Array.c
+++ b/test/Array.c
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include <X11/Xdmcp.h>
 #include <inttypes.h>
@@ -53,10 +54,35 @@ TestAllocOversizeArrays(void)
     TestAllocOversize(ARRAYofARRAY8, UINT8_MAX + 1);
 }
 
+static void
+TestZeroFillARRAYofARRAY8(void)
+{
+    ARRAYofARRAY8 aa;
+    int result;
+    char *noise;
+
+    printf("Checking XdmcpAllocARRAYofARRAY8 zero fills array...\n");
+    /* prefill memory with junk - hopefully next malloc will pick up some */
+    noise = malloc(32 * sizeof(ARRAY8));
+    memset(noise, 0xdeadbeef, 32 * sizeof(ARRAY8));
+    free(noise);
+    result = XdmcpAllocARRAYofARRAY8(&aa, 32);
+    assert(result == TRUE);
+    assert(aa.length == 32);
+    assert(aa.data[4].data == NULL);
+    printf("Checking XdmcpReallocARRAYofARRAY8 zero fills array...\n");
+    result = XdmcpAllocARRAYofARRAY8(&aa, 48);
+    assert(result == TRUE);
+    assert(aa.length == 48);
+    assert(aa.data[40].data == NULL);
+    XdmcpDisposeARRAYofARRAY8(&aa);
+}
+
 int
 main(int argc, char **argv)
 {
     TestAllocOversizeArrays();
+    TestZeroFillARRAYofARRAY8();
 
     exit(0);
 }

commit 787c4c79be18373f58aeaf2fe543f30fe3af2bd1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 24 22:58:41 2013 -0700

    Ensure ARRAY* structs are zero'ed out when oversize values are passed
    
    Previous fix missed a case in which we returned failure, but didn't
    fill in the data pointer & size values.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Array.c b/Array.c
index f529781..c1456e1 100644
--- a/Array.c
+++ b/Array.c
@@ -55,80 +55,68 @@ xrealloc(void *ptr, size_t size)
 int
 XdmcpAllocARRAY8 (ARRAY8Ptr array, int length)
 {
-    CARD8Ptr	newData;
-
     /* length defined in ARRAY8 struct is a CARD16 (not CARD8 like the rest) */
     if (length > UINT16_MAX)
-	return FALSE;
+        array->data = NULL;
+    else
+        array->data = xmalloc(length * sizeof (CARD8));
 
-    newData = (CARD8Ptr) xmalloc(length * sizeof (CARD8));
-    if (!newData) {
+    if (array->data == NULL) {
 	array->length = 0;
-	array->data = NULL;
 	return FALSE;
     }
     array->length = (CARD16) length;
-    array->data = newData;
     return TRUE;
 }
 
 int
 XdmcpAllocARRAY16 (ARRAY16Ptr array, int length)
 {
-    CARD16Ptr	newData;
-
     /* length defined in ARRAY16 struct is a CARD8 */
     if (length > UINT8_MAX)
-	return FALSE;
+        array->data = NULL;
+    else
+        array->data = xmalloc(length * sizeof (CARD16));
 
-    newData = (CARD16Ptr) xmalloc(length * sizeof (CARD16));
-    if (!newData) {
+    if (array->data == NULL) {
 	array->length = 0;
-	array->data = NULL;
 	return FALSE;
     }
     array->length = (CARD8) length;
-    array->data = newData;
     return TRUE;
 }
 
 int
 XdmcpAllocARRAY32 (ARRAY32Ptr array, int length)
 {
-    CARD32Ptr	newData;
-
     /* length defined in ARRAY32 struct is a CARD8 */
     if (length > UINT8_MAX)
-	return FALSE;
+        array->data = NULL;
+    else
+        array->data = xmalloc(length * sizeof (CARD32));
 
-    newData = (CARD32Ptr) xmalloc(length * sizeof (CARD32));
-    if (!newData) {
+    if (array->data == NULL) {
 	array->length = 0;
-	array->data = NULL;
 	return FALSE;
     }
     array->length = (CARD8) length;
-    array->data = newData;
     return TRUE;
 }
 
 int
 XdmcpAllocARRAYofARRAY8 (ARRAYofARRAY8Ptr array, int length)
 {
-    ARRAY8Ptr	newData;
-
     /* length defined in ARRAYofARRAY8 struct is a CARD8 */
     if (length > UINT8_MAX)
-	return FALSE;
+        array->data = NULL;
+    else
+        array->data = xmalloc(length * sizeof (ARRAY8));
 
-    newData = (ARRAY8Ptr) xmalloc(length * sizeof (ARRAY8));
-    if (!newData) {
+    if (array->data == NULL) {
 	array->length = 0;
-	array->data = NULL;
 	return FALSE;
     }
     array->length = (CARD8) length;
-    array->data = newData;
     return TRUE;
 }
 

commit 9089ae455f9df222aa85bbbcb4526874c0d97099
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 24 22:24:55 2013 -0700

    Add unit tests for Array allocation functions
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/.gitignore b/.gitignore
index 07ac69e..edf9a16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,3 +76,4 @@ core
 #		Edit the following section as needed
 # For example, !report.pc overrides *.pc. See 'man gitignore'
 # 
+test/Array
diff --git a/Makefile.am b/Makefile.am
index c3b85aa..ca54099 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=doc
+SUBDIRS=doc . test
 
 lib_LTLIBRARIES = libXdmcp.la
 
diff --git a/configure.ac b/configure.ac
index d8ddfae..4e85650 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,10 +35,10 @@ AM_MAINTAINER_MODE
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 
-# Require xorg-macros minimum of 1.12 for DocBook external references
+# Require xorg-macros minimum of 1.16 for unit testing with memory checks
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.12)
+          [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.16)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DOCS
 XORG_WITH_XMLTO(0.0.22)
@@ -72,7 +72,11 @@ AM_CONDITIONAL(HASXDMAUTH,test x$HASXDMAUTH = xyes)
 XORG_WITH_LINT
 XORG_LINT_LIBRARY([Xdmcp])
 
+#  --enable-unit-tests
+XORG_ENABLE_UNIT_TESTS([yes])
+
 AC_CONFIG_FILES([Makefile
 		doc/Makefile


Reply to: