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

libxfont: Changes to 'debian-unstable'



 ChangeLog             |   90 ++++++++++++++++++++
 configure.ac          |    2 
 debian/changelog      |   11 ++
 src/bitmap/bdfread.c  |   35 +++++++
 src/fc/fslibos.h      |  220 ++++++++++++++++++++++++--------------------------
 src/fontfile/fileio.c |    5 -
 src/fontfile/filewr.c |   12 +-
 7 files changed, 253 insertions(+), 122 deletions(-)

New commits:
commit 0e9bc160f491794f44006a5d6f13fd625398dc95
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Mar 17 16:55:30 2015 +0100

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index fa661a5..b060b5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,13 @@
-libxfont (1:1.5.1-1) UNRELEASED; urgency=medium
+libxfont (1:1.5.1-1) unstable; urgency=high
 
   * New upstream release
     + bdfReadProperties: property count needs range check [CVE-2015-1802]
-    + bdfReadCharacters: bailout if a char's bitmap cannot be read [CVE-2015-1803]
-    + bdfReadCharacters: ensure metrics fit into xCharInfo struct [CVE-2015-1804]
+    + bdfReadCharacters: bailout if a char's bitmap cannot be read
+      [CVE-2015-1803]
+    + bdfReadCharacters: ensure metrics fit into xCharInfo struct
+      [CVE-2015-1804]
 
- -- Julien Cristau <jcristau@debian.org>  Tue, 17 Mar 2015 16:32:25 +0100
+ -- Julien Cristau <jcristau@debian.org>  Tue, 17 Mar 2015 16:55:21 +0100
 
 libxfont (1:1.4.99.901-1) unstable; urgency=medium
 

commit a5beb65ddd2e64cf633176c543ed604ade77da25
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Mar 17 16:34:09 2015 +0100

    Bump changelogs

diff --git a/ChangeLog b/ChangeLog
index 6209530..7211c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,93 @@
+commit da4246c98bc51297daeec47c15181e179df94013
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Mar 17 08:12:19 2015 -0700
+
+    libXfont 1.5.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2351c83a77a478b49cba6beb2ad386835e264744
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Mar 6 22:54:58 2015 -0800
+
+    bdfReadCharacters: ensure metrics fit into xCharInfo struct [CVE-2015-1804]
+    
+    We use 32-bit ints to read from the bdf file, but then try to stick
+    into a 16-bit int in the xCharInfo struct, so make sure they won't
+    overflow that range.
+    
+    Found by afl-1.24b.
+    
+    v2: Verify that additions won't overflow 32-bit int range either.
+    v3: As Julien correctly observes, the previous check for bh & bw not
+        being < 0 reduces the number of cases we need to check for overflow.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 78c2e3d70d29698244f70164428bd2868c0ab34c
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Feb 6 15:54:00 2015 -0800
+
+    bdfReadCharacters: bailout if a char's bitmap cannot be read [CVE-2015-1803]
+    
+    Previously would charge on ahead with a NULL pointer in ci->bits, and
+    then crash later in FontCharInkMetrics() trying to access the bits.
+    
+    Found with afl-1.23b.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit 2deda9906480f9c8ae07b8c2a5510cc7e4c59a8e
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Feb 6 15:50:45 2015 -0800
+
+    bdfReadProperties: property count needs range check [CVE-2015-1802]
+    
+    Avoid integer overflow or underflow when allocating memory arrays
+    by multiplying the number of properties reported for a BDF font.
+    
+    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit d9fda3d247942292a5f24694c22337c547006e11
+Author: Christos Zoulas <christos@NetBSD.org>
+Date:   Wed Feb 25 21:39:30 2015 +0100
+
+    Set close-on-exec for font file I/O.
+    
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+
+commit 3b33588117c2ca3099b999939985ffe098d479b3
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 5 17:41:24 2014 -0800
+
+    Use 'imdent' to realign cpp indentation levels in fslibos.h
+    
+    Parts were indented, others weren't, now is more consistent.
+    'git diff -w' shows no non-whitespace changes in this commit
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 03c035b061a0582159467dcadfc8e95074e2a84f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 5 17:39:05 2014 -0800
+
+    Remove unneeded checks for #ifndef X_NOT_POSIX
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ad4f4d8a2d0730c0ea3c09210bf921638b4682bc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Jul 19 09:49:23 2014 -0700
+
+    libXfont 1.5.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit b19cf2a78f7f721c43d0d9e2f32b71fc746142a3
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Mon Jul 7 13:18:18 2014 -0700
diff --git a/debian/changelog b/debian/changelog
index facbe53..fa661a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+libxfont (1:1.5.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release
+    + bdfReadProperties: property count needs range check [CVE-2015-1802]
+    + bdfReadCharacters: bailout if a char's bitmap cannot be read [CVE-2015-1803]
+    + bdfReadCharacters: ensure metrics fit into xCharInfo struct [CVE-2015-1804]
+
+ -- Julien Cristau <jcristau@debian.org>  Tue, 17 Mar 2015 16:32:25 +0100
+
 libxfont (1:1.4.99.901-1) unstable; urgency=medium
 
   * New upstream release candidate.

commit da4246c98bc51297daeec47c15181e179df94013
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Mar 17 08:12:19 2015 -0700

    libXfont 1.5.1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 471b266..7cb6bdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXfont], [1.5.0],
+AC_INIT([libXfont], [1.5.1],
 	[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])

commit 2351c83a77a478b49cba6beb2ad386835e264744
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Mar 6 22:54:58 2015 -0800

    bdfReadCharacters: ensure metrics fit into xCharInfo struct [CVE-2015-1804]
    
    We use 32-bit ints to read from the bdf file, but then try to stick
    into a 16-bit int in the xCharInfo struct, so make sure they won't
    overflow that range.
    
    Found by afl-1.24b.
    
    v2: Verify that additions won't overflow 32-bit int range either.
    v3: As Julien correctly observes, the previous check for bh & bw not
        being < 0 reduces the number of cases we need to check for overflow.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
index 1b29b81..a0ace8f 100644
--- a/src/bitmap/bdfread.c
+++ b/src/bitmap/bdfread.c
@@ -62,8 +62,16 @@ from The Open Group.
 
 #if HAVE_STDINT_H
 #include <stdint.h>
-#elif !defined(INT32_MAX)
-#define INT32_MAX 0x7fffffff
+#else
+# ifndef INT32_MAX
+#  define INT32_MAX 0x7fffffff
+# endif
+# ifndef INT16_MAX
+#  define INT16_MAX 0x7fff
+# endif
+# ifndef INT16_MIN
+#  define INT16_MIN (0 - 0x8000)
+# endif
 #endif
 
 #define INDICES 256
@@ -417,6 +425,12 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
 	    bdfError("DWIDTH y value must be zero\n");
 	    goto BAILOUT;
 	}
+	/* xCharInfo metrics are stored as INT16 */
+	if ((wx < 0) || (wx > INT16_MAX)) {
+	    bdfError("character '%s' has out of range width, %d\n",
+		     charName, wx);
+	    goto BAILOUT;
+	}
 	line = bdfGetLine(file, lineBuf, BDFLINELEN);
 	if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) {
 	    bdfError("bad 'BBX'\n");
@@ -427,6 +441,14 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
 		     charName, bw, bh);
 	    goto BAILOUT;
 	}
+	/* xCharInfo metrics are read as int, but stored as INT16 */
+	if ((bl > INT16_MAX) || (bl < INT16_MIN) ||
+	    (bb > INT16_MAX) || (bb < INT16_MIN) ||
+	    (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) {
+	    bdfError("character '%s' has out of range metrics, %d %d %d %d\n",
+		     charName, bl, (bl+bw), (bh+bb), -bb);
+	    goto BAILOUT;
+	}
 	line = bdfGetLine(file, lineBuf, BDFLINELEN);
 	if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) {
 	    for (p = line + strlen("ATTRIBUTES ");

commit 78c2e3d70d29698244f70164428bd2868c0ab34c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Feb 6 15:54:00 2015 -0800

    bdfReadCharacters: bailout if a char's bitmap cannot be read [CVE-2015-1803]
    
    Previously would charge on ahead with a NULL pointer in ci->bits, and
    then crash later in FontCharInkMetrics() trying to access the bits.
    
    Found with afl-1.23b.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
index 6387908..1b29b81 100644
--- a/src/bitmap/bdfread.c
+++ b/src/bitmap/bdfread.c
@@ -458,7 +458,10 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
 	    ci->metrics.descent = -bb;
 	    ci->metrics.characterWidth = wx;
 	    ci->bits = NULL;
-	    bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes);
+	    if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) {
+		bdfError("could not read bitmap for character '%s'\n", charName);
+		goto BAILOUT;
+	    }
 	    ci++;
 	    ndx++;
 	} else

commit 2deda9906480f9c8ae07b8c2a5510cc7e4c59a8e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Feb 6 15:50:45 2015 -0800

    bdfReadProperties: property count needs range check [CVE-2015-1802]
    
    Avoid integer overflow or underflow when allocating memory arrays
    by multiplying the number of properties reported for a BDF font.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/bitmap/bdfread.c b/src/bitmap/bdfread.c
index 914a024..6387908 100644
--- a/src/bitmap/bdfread.c
+++ b/src/bitmap/bdfread.c
@@ -604,7 +604,9 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState)
 	bdfError("missing 'STARTPROPERTIES'\n");
 	return (FALSE);
     }
-    if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) {
+    if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) ||
+	(nProps <= 0) ||
+	(nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) {
 	bdfError("bad 'STARTPROPERTIES'\n");
 	return (FALSE);
     }

commit d9fda3d247942292a5f24694c22337c547006e11
Author: Christos Zoulas <christos@NetBSD.org>
Date:   Wed Feb 25 21:39:30 2015 +0100

    Set close-on-exec for font file I/O.
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c
index 80af511..d44cecd 100644
--- a/src/fontfile/fileio.c
+++ b/src/fontfile/fileio.c
@@ -36,6 +36,9 @@ in this Software without prior written authorization from The Open Group.
 #ifndef O_BINARY
 #define O_BINARY O_RDONLY
 #endif
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
 
 FontFilePtr
 FontFileOpen (const char *name)
@@ -44,7 +47,7 @@ FontFileOpen (const char *name)
     int		len;
     BufFilePtr	raw, cooked;
 
-    fd = open (name, O_BINARY);
+    fd = open (name, O_BINARY|O_CLOEXEC);
     if (fd < 0)
 	return 0;
     raw = BufFileOpenRead (fd);
diff --git a/src/fontfile/filewr.c b/src/fontfile/filewr.c
index bcc7b1e..859a0be 100644
--- a/src/fontfile/filewr.c
+++ b/src/fontfile/filewr.c
@@ -33,17 +33,19 @@ in this Software without prior written authorization from The Open Group.
 #endif
 #include <X11/fonts/fntfilio.h>
 #include <X11/Xos.h>
+#ifndef O_BINARY
+#define O_BINARY	0
+#endif
+#ifndef O_CLOEXEC
+#define O_CLOEXEC	0
+#endif
 
 FontFilePtr
 FontFileOpenWrite (const char *name)
 {
     int	fd;
 
-#if defined(WIN32) || defined(__CYGWIN__)
-    fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666);
-#else
-    fd = creat (name, 0666);
-#endif
+    fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY|O_CLOEXEC, 0666);
     if (fd < 0)
 	return 0;
     return (FontFilePtr) BufFileOpenWrite (fd);

commit 3b33588117c2ca3099b999939985ffe098d479b3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Nov 5 17:41:24 2014 -0800

    Use 'imdent' to realign cpp indentation levels in fslibos.h
    
    Parts were indented, others weren't, now is more consistent.
    'git diff -w' shows no non-whitespace changes in this commit
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/fc/fslibos.h b/src/fc/fslibos.h
index 36eb879..1ef362d 100644
--- a/src/fc/fslibos.h
+++ b/src/fc/fslibos.h
@@ -43,174 +43,174 @@ from The Open Group.
  * makedepend screws up on #undef OPEN_MAX, so we define a new symbol
  */
 
-#ifndef FONT_OPEN_MAX
-
-# ifdef _POSIX_SOURCE
-#  include <limits.h>
-# else
-#  define _POSIX_SOURCE
-#  include <limits.h>
-#  undef _POSIX_SOURCE
-# endif
-#ifndef SIZE_MAX
-# ifdef ULONG_MAX
-#  define SIZE_MAX ULONG_MAX
+# ifndef FONT_OPEN_MAX
+
+#  ifdef _POSIX_SOURCE
+#   include <limits.h>
+#  else
+#   define _POSIX_SOURCE
+#   include <limits.h>
+#   undef _POSIX_SOURCE
+#  endif
+#  ifndef SIZE_MAX
+#   ifdef ULONG_MAX
+#    define SIZE_MAX ULONG_MAX
+#   else
+#    define SIZE_MAX UINT_MAX
+#   endif
+#  endif
+#  ifndef OPEN_MAX
+#   if defined(SVR4)
+#    define OPEN_MAX 256
+#   else
+#    include <sys/param.h>
+#    ifndef OPEN_MAX
+#     ifdef __OSF1__
+#      define OPEN_MAX 256
+#     else
+#      ifdef NOFILE
+#       define OPEN_MAX NOFILE
+#      else
+#       define OPEN_MAX NOFILES_MAX
+#      endif
+#     endif
+#    endif
+#   endif
+#  endif
+
+#  if OPEN_MAX > 256
+#   define FONT_OPEN_MAX 256
+#  else
+#   define FONT_OPEN_MAX OPEN_MAX
+#  endif
+
+# endif /* FONT_OPEN_MAX */
+
+# ifdef WORD64
+#  define NMSKBITS 64
 # else
-#  define SIZE_MAX UINT_MAX
+#  define NMSKBITS 32
 # endif
-#endif
-#ifndef OPEN_MAX
-#if defined(SVR4)
-#define OPEN_MAX 256
-#else
-#include <sys/param.h>
-#ifndef OPEN_MAX
-#ifdef __OSF1__
-#define OPEN_MAX 256
-#else
-#ifdef NOFILE
-#define OPEN_MAX NOFILE
-#else
-#define OPEN_MAX NOFILES_MAX
-#endif
-#endif
-#endif
-#endif
-#endif
-
-#if OPEN_MAX > 256
-#define FONT_OPEN_MAX 256
-#else
-#define FONT_OPEN_MAX OPEN_MAX
-#endif
 
-#endif /* FONT_OPEN_MAX */
-
-#ifdef WORD64
-#define NMSKBITS 64
-#else
-#define NMSKBITS 32
-#endif
-
-#define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS)
+# define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS)
 
 typedef unsigned long FdSet[MSKCNT];
 typedef FdSet FdSetPtr;
 
-#if (MSKCNT==1)
-#define BITMASK(i) (1 << (i))
-#define MASKIDX(i) 0
-#endif
+# if (MSKCNT==1)
+#  define BITMASK(i) (1 << (i))
+#  define MASKIDX(i) 0
+# endif
 
-#if (MSKCNT>1)
-#define BITMASK(i) (1 << ((i) & (NMSKBITS - 1)))
-#define MASKIDX(i) ((i) / NMSKBITS)
-#endif
+# if (MSKCNT>1)
+#  define BITMASK(i) (1 << ((i) & (NMSKBITS - 1)))
+#  define MASKIDX(i) ((i) / NMSKBITS)
+# endif
 
-#define MASKWORD(buf, i) buf[MASKIDX(i)]
-#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i)
-#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i)
-#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
-
-#if (MSKCNT==1)
-#define COPYBITS(src, dst) dst[0] = src[0]
-#define CLEARBITS(buf) buf[0] = 0
-#define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0])
-#define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0])
-#define UNSETBITS(dst, b1) (dst[0] &= ~b1[0])
-#define ANYSET(src) (src[0])
-#endif
+# define MASKWORD(buf, i) buf[MASKIDX(i)]
+# define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i)
+# define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i)
+# define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i))
+
+# if (MSKCNT==1)
+#  define COPYBITS(src, dst) dst[0] = src[0]
+#  define CLEARBITS(buf) buf[0] = 0
+#  define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0])
+#  define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0])
+#  define UNSETBITS(dst, b1) (dst[0] &= ~b1[0])
+#  define ANYSET(src) (src[0])
+# endif
 
-#if (MSKCNT==2)
-#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; }
-#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; }
-#define MASKANDSETBITS(dst, b1, b2)  {\
+# if (MSKCNT==2)
+#  define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; }
+#  define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; }
+#  define MASKANDSETBITS(dst, b1, b2)  {\
 		      dst[0] = (b1[0] & b2[0]);\
 		      dst[1] = (b1[1] & b2[1]); }
-#define ORBITS(dst, b1, b2)  {\
+#  define ORBITS(dst, b1, b2)  {\
 		      dst[0] = (b1[0] | b2[0]);\
 		      dst[1] = (b1[1] | b2[1]); }
-#define UNSETBITS(dst, b1) {\
+#  define UNSETBITS(dst, b1) {\
                       dst[0] &= ~b1[0]; \
                       dst[1] &= ~b1[1]; }
-#define ANYSET(src) (src[0] || src[1])
-#endif
+#  define ANYSET(src) (src[0] || src[1])
+# endif
 
-#if (MSKCNT==3)
-#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \
+# if (MSKCNT==3)
+#  define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \
 			     dst[2] = src[2]; }
-#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; }
-#define MASKANDSETBITS(dst, b1, b2)  {\
+#  define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; }
+#  define MASKANDSETBITS(dst, b1, b2)  {\
 		      dst[0] = (b1[0] & b2[0]);\
 		      dst[1] = (b1[1] & b2[1]);\
 		      dst[2] = (b1[2] & b2[2]); }
-#define ORBITS(dst, b1, b2)  {\
+#  define ORBITS(dst, b1, b2)  {\
 		      dst[0] = (b1[0] | b2[0]);\
 		      dst[1] = (b1[1] | b2[1]);\
 		      dst[2] = (b1[2] | b2[2]); }
-#define UNSETBITS(dst, b1) {\
+#  define UNSETBITS(dst, b1) {\
                       dst[0] &= ~b1[0]; \
                       dst[1] &= ~b1[1]; \
                       dst[2] &= ~b1[2]; }
-#define ANYSET(src) (src[0] || src[1] || src[2])
-#endif
+#  define ANYSET(src) (src[0] || src[1] || src[2])
+# endif
 
-#if (MSKCNT==4)
-#define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \
+# if (MSKCNT==4)
+#  define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \
 			   dst[2] = src[2]; dst[3] = src[3]
-#define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0
-#define MASKANDSETBITS(dst, b1, b2)  \
+#  define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0
+#  define MASKANDSETBITS(dst, b1, b2)  \
                       dst[0] = (b1[0] & b2[0]);\
                       dst[1] = (b1[1] & b2[1]);\
                       dst[2] = (b1[2] & b2[2]);\
                       dst[3] = (b1[3] & b2[3])
-#define ORBITS(dst, b1, b2)  \
+#  define ORBITS(dst, b1, b2)  \
                       dst[0] = (b1[0] | b2[0]);\
                       dst[1] = (b1[1] | b2[1]);\
                       dst[2] = (b1[2] | b2[2]);\
                       dst[3] = (b1[3] | b2[3])
-#define UNSETBITS(dst, b1) \
+#  define UNSETBITS(dst, b1) \
                       dst[0] &= ~b1[0]; \
                       dst[1] &= ~b1[1]; \
                       dst[2] &= ~b1[2]; \
                       dst[3] &= ~b1[3]
-#define ANYSET(src) (src[0] || src[1] || src[2] || src[3])
-#endif
+#  define ANYSET(src) (src[0] || src[1] || src[2] || src[3])
+# endif
 
-#if (MSKCNT>4)
-#define COPYBITS(src, dst) memmove((caddr_t) dst, (caddr_t) src,\
+# if (MSKCNT>4)
+#  define COPYBITS(src, dst) memmove((caddr_t) dst, (caddr_t) src,\
 				   MSKCNT*sizeof(long))
-#define CLEARBITS(buf) bzero((caddr_t) buf, MSKCNT*sizeof(long))
-#define MASKANDSETBITS(dst, b1, b2)  \
+#  define CLEARBITS(buf) bzero((caddr_t) buf, MSKCNT*sizeof(long))
+#  define MASKANDSETBITS(dst, b1, b2)  \
 		      { int cri;			\
 			for (cri=MSKCNT; --cri>=0; )	\
 		          dst[cri] = (b1[cri] & b2[cri]); }
-#define ORBITS(dst, b1, b2)  \
+#  define ORBITS(dst, b1, b2)  \
 		      { int cri;			\
 		      for (cri=MSKCNT; --cri>=0; )	\
 		          dst[cri] = (b1[cri] | b2[cri]); }
-#define UNSETBITS(dst, b1) \
+#  define UNSETBITS(dst, b1) \
 		      { int cri;			\
 		      for (cri=MSKCNT; --cri>=0; )	\
 		          dst[cri] &= ~b1[cri];  }
-#if (MSKCNT==8)
-#define ANYSET(src) (src[0] || src[1] || src[2] || src[3] || \
+#  if (MSKCNT==8)
+#   define ANYSET(src) (src[0] || src[1] || src[2] || src[3] || \
 		     src[4] || src[5] || src[6] || src[7])
-#endif
-#endif
+#  endif
+# endif
 
 #else /* not WIN32 */
 
-#include <X11/Xwinsock.h>
-#include <X11/Xw32defs.h>
+# include <X11/Xwinsock.h>
+# include <X11/Xw32defs.h>
 
 typedef fd_set FdSet;
 typedef FdSet *FdSetPtr;
 
-#define CLEARBITS(set) FD_ZERO(&set)
-#define BITSET(set,s) FD_SET(s,&set)
-#define BITCLEAR(set,s) FD_CLR(s,&set)
-#define GETBIT(set,s) FD_ISSET(s,&set)
-#define ANYSET(set) set->fd_count
+# define CLEARBITS(set) FD_ZERO(&set)
+# define BITSET(set,s) FD_SET(s,&set)
+# define BITCLEAR(set,s) FD_CLR(s,&set)
+# define GETBIT(set,s) FD_ISSET(s,&set)
+# define ANYSET(set) set->fd_count
 
 #endif

commit 03c035b061a0582159467dcadfc8e95074e2a84f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Nov 5 17:39:05 2014 -0800

    Remove unneeded checks for #ifndef X_NOT_POSIX
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/fc/fslibos.h b/src/fc/fslibos.h
index c1f0ede..36eb879 100644
--- a/src/fc/fslibos.h
+++ b/src/fc/fslibos.h
@@ -45,7 +45,6 @@ from The Open Group.
 
 #ifndef FONT_OPEN_MAX
 
-#ifndef X_NOT_POSIX
 # ifdef _POSIX_SOURCE
 #  include <limits.h>
 # else
@@ -53,7 +52,6 @@ from The Open Group.
 #  include <limits.h>
 #  undef _POSIX_SOURCE
 # endif
-#endif
 #ifndef SIZE_MAX
 # ifdef ULONG_MAX
 #  define SIZE_MAX ULONG_MAX

commit ad4f4d8a2d0730c0ea3c09210bf921638b4682bc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Jul 19 09:49:23 2014 -0700

    libXfont 1.5.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index d4320de..471b266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libXfont], [1.4.99.901],
+AC_INIT([libXfont], [1.5.0],
 	[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])


Reply to: