commit cdb2f990348c3bd1407022f7e0e5fcba552d539f
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Sat Nov 25 12:01:16 2017 +0100

    libXfont2 2.0.3
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>

commit 7b377456f95d2ec3ead40f4fb74ea620191f88c8
Author: Michal Srb <msrb@suse.com>
Date:   Thu Oct 26 09:48:13 2017 +0200

    Open files with O_NOFOLLOW. (CVE-2017-16611)
    
    A non-privileged X client can instruct X server running under root to open any
    file by creating own directory with "fonts.dir", "fonts.alias" or any font file
    being a symbolic link to any other file in the system. X server will then open
    it. This can be issue with special files such as /dev/watchdog.
    
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit d82dfe25491c599f650b2ad868772c3b8e6ba7bc
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 11 11:33:29 2017 -0400

    libXfont 2.0.2
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 672bb944311392e2415b39c0d63b1e1902905bcd
Author: Michal Srb <msrb@suse.com>
Date:   Thu Jul 20 17:05:23 2017 +0200

    pcfGetProperties: Check string boundaries (CVE-2017-13722)
    
    Without the checks a malformed PCF file can cause the library to make
    atom from random heap memory that was behind the `strings` buffer.
    This may crash the process or leak information.
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

commit d1e670a4a8704b8708e493ab6155589bcd570608
Author: Michal Srb <msrb@suse.com>
Date:   Thu Jul 20 13:38:53 2017 +0200

    Check for end of string in PatternMatch (CVE-2017-13720)
    
    If a pattern contains '?' character, any character in the string is skipped,
    even if it is '\0'. The rest of the matching then reads invalid memory.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Julien Cristau <jcristau@debian.org>

commit 9112a6846b9d8ff18f7568c58e06d0a450e25814
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Apr 13 12:10:05 2017 -0400

    readme: Update for libXfont 2.0 interface change
    
    While xfs can be more or less trivially ported to 2.0, bcftopcf cannot
    because the font file I/O API is no longer externally visible. This is
    intentional, because bdftopcf is literally the only consumer of that
    API, and is itself only used in the build process for the classic core
    fonts themselves. The plan for bdftopcf is to import a copy of libXfont
    1.5 and link against that statically instead.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>

commit f8ff8d5f7442b3cbac57d5fe343aabd8f54a030f
Author: Emil Velikov <emil.l.velikov@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.velikov@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 75b9a15b51a062941a549fef0dedaee9daef4867
Author: Peter Hutterer <peter.hutterer@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.hutterer@who-t.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit 33a98f2b5343da927f29191348e992f505544873
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jun 8 14:28:09 2016 -0400

    freetype: Fix a logic error in computing face name
    
    gcc6 chirps an indentation warning here, but really this is bad code.
    Effectively this would ignore en_US or en_UK names for the font, despite
    that those are the English names the font is most likely to have.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 79084468fb844e386a72d938c67be0728959a2bd
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed May 18 11:49:52 2016 -0400

    autogen: Set a default subject prefix for patches
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 7557fe152d9948bcb4b805bb7b6b6f8121bd34fb
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed May 18 11:52:27 2016 -0400

    configure: Use -fvisibility=hidden if available
    
    text	   data	    bss	    dec	    hex	filename
     233732	   8168	   1616	 243516	  3b73c	.libs/libXfont2.so.2.before
     217113	   6816	   1616	 225545	  37109	.libs/libXfont2.so.2.after
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

commit 6972ea08ee5b2ef1cfbdc2fcaf14f06bbd391561
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Mon May 30 00:46:21 2016 -0700

    fserve: Fix a buffer read overrun in _fs_client_access
    
    https://bugs.freedesktop.org/show_bug.cgi?id=83224
    
    Found by clang's Address Sanitizer
    
    	crac.num_auths = set_font_authorizations(&authorizations, &authlen,
    						 client);
    	/* Work around bug in xfs versions up through modular release 1.0.8
    	   which rejects CreateAC packets with num_auths = 0 & authlen < 4 */
    	if (crac.num_auths == 0) {
    	    authorizations = padding;
    	    authlen = 4;
    	} else {
    	    authlen = (authlen + 3) & ~0x3;
    	}
    	crac.length = (sizeof (fsCreateACReq) + authlen) >> 2;
    	crac.acid = cur->acid;
    	_fs_add_req_log(conn, FS_CreateAC);
    	_fs_write(conn, (char *) &crac, sizeof (fsCreateACReq));
    	_fs_write(conn, authorizations, authlen);
    
    In the case in the report, set_font_authorizations setup authorizations as a
    34 byte buffer (and authlen set to 34 as one would expect). The following
    block changed authlen to 36 to make it 4byte aligned and the final _fs_write()
    caused us to read 36 bytes from this 34 byte buffer.
    
    This changes the incorrect size increase to instead use _fs_write_pad which
    takes care of the padding for us.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit d967caa988eaabd9e84c82879e2f21bd33b952a7
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun May 29 23:39:06 2016 -0700

    fstrans: Remove unused foo() function
    
    The point of it seems to have been to silence an unused function warning, but
    there's no point if we're just transitioning that to another unused function
    warning.
    
    src/fc/fstrans.c:32:20: warning: unused function 'foo' [-Wunused-function]
    static inline void foo(void) { (void) is_numeric("a"); }
                       ^
    1 warning generated.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>

commit e6009adbc89ec3e1f924bcb57b333c1c02f5e66d
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun May 29 23:37:13 2016 -0700

    fserve: Silence a -Wformat warning
    
    src/fc/fserve.c:653:32: warning: format specifies type 'int' but the argument has type 'CARD32' (aka 'unsigned long') [-Wformat]
                   " from font server\n", rep->length);
                                          ^~~~~~~~~~~
    1 warning generated.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit ac559fad20bbae45332c758abb6a790c3fd341a2
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun May 29 23:34:35 2016 -0700

    bitmap: Bail out on invalid input to FontFileMakeDir instead of calling calloc for 0 bytes
    
    Found by clang static analysis:
        Call to 'calloc' has an allocation size of 0 bytes
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit d0fff111992fed9d9bfbf0c19e136bda9ba1db55
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun May 29 23:29:50 2016 -0700

    FreeType: Correct an allocation size
    
    Found by clang static analysis:
        Result of 'calloc' is converted to a pointer of type 'int', which is
        incompatible with sizeof operand type 'int *'
    
    This is likely benign because the old size was larger on any platform where
    sizeof(int) <= sizeof(void *), which is everywhere.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit eefc0b0b908eb8533e704d7156ce983ad7891cc5
Author: Keith Packard <keithp@keithp.com>
Date:   Sat Dec 12 14:54:26 2015 -0800

    Revert "Add compiler warning flags". Leave warning fixes.
    
    This reverts commit eb67d10ae82b364a4324e96ce53baaa4e5e75f97, but
    leaves the warning fixes in place; it looks like either I was
    confused, or something has changed so that XORG_DEFAULT_OPTIONS now
    pulls in the appropriate compiler warnings.

commit 14488af0338191356c0177e3d0b5fa473ffbd59c
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Dec 11 07:08:29 2015 -0800

    Bump version to 2.0.1
    
    This release just fixes some build issues with 2.0.0
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 95a40553b8f12cd9479dd4b3c531e2069c53b870
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Dec 9 14:53:26 2015 -0800

    Remove fontconf.h
    
    This file used to advertise which font formats the library
    supports. The X server doesn't care, so let's just remove it so that
    it doesn't conflict with the older version of libXfont
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 903cd14547b445d7f40b52462750fc8b28441581
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed Sep 2 19:15:27 2015 -0700

    Convert to non-recursive build.

commit 9928d71ec04cd630a8ed9c583d144decb4e98c05
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Dec 9 09:07:30 2015 -0800

    Add missing 'attributes.m4' file
    
    Matt Turner noted that this file was missing; 'make distcheck' doesn't
    appear to catch this kind of problem.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 135fb032e940ce226c9feb13e6e903f3ecbc5eb0
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Sep 2 00:04:32 2015 -0700

    Eliminate calls back to X server or font server functions by name (v4)
    
    This eliminates the weak symbol adventures and makes all of the calls
    back to the X server or Font server go through a table of functions
    instead, clarifying the required API.
    
    As this is a rather major change to the API for the library, it now
    installs itself as libXfont2 instead of libXfont, and the package
    config file is now xfont2.pc.
    
    All of the installed headers remain the same as the original library;
    there's now a new include file, libxfont2.h, which defines the X
    server and Font server interfaces.
    
    This moves util/atom.c to stubs/atom.c and reformats that file, hence
    the diff being larger than it would otherwise be.
    
    v2: Rename to libXfont2 instead of libXfont_2 as suggested by Emil Velikov
        Fix whitespace in stubs/atom.c, which was moved from util/
    
    v3: Remove select masks from API. Expose single 'font_init' function
        for all library initialization.
    
    v4: Change name of distributed tarballs to libXfont2 as well
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit eb67d10ae82b364a4324e96ce53baaa4e5e75f97
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Dec 7 15:46:13 2015 -0800

    Add compiler warning flags and fix warnings
    
    Mostly signed vs unsigned comparisons
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit d6877a7c1c35985f6a75b6cd4e814595e781adc4
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Oct 21 21:03:00 2015 -0700

    Use NO_WEAK_SYMBOLS instead of -flat_namespace
    
    Lesser of two evil hacks, I suppose...
    
    This reverts commit 0386fa77367a305deea3cc27f8a3865cc3c467c0.

commit 2788c6984bc54bfba61b2dbdb5353978199d8a37
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Oct 21 21:27:26 2015 -0700

    stubs: Add missing externs for declarations in the NO_WEAK_SYMBOLS && PIC stubs resolution
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit d66f107d6e714a54515f39d94caf46aef9be7416
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Wed Feb 25 21:45:50 2015 +0100

    Fix is*() usage.
    
    The argument must be an unsigned char or -1; in these cases
    we know it's not -1 so cast it to unsigned char.
    Fixes
    warning: array subscript is of type 'char' [-Wchar-subscripts]
    
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>

commit 1a73d6828dfa03924f2d68644fb5b99afd9c78e2
Author: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Date:   Mon Jul 13 14:43:06 2015 -0400

    bdfReadCharacters: Allow negative DWIDTH values
    
    The fix for CVE-2015-1804 prevent DWIDTH to be negative.
    However, the spec states that "DWIDTH [...] is a vector indicating the
    position of the next glyph’s origin relative to the origin of this glyph."
    
    So negative values are correct.
    
    Found by trying to compile XTS.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 159bfa4ec094e7d342c9b59c31bfea7dccbac58a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Feb 7 17:24:48 2015 -0800

    doc: add a couple olinks to fsproto & xfs-design docs
    
    Don't seem to have ability to link to BDF or Xserver internals docs yet
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

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

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

commit 0dcdd82059c69ec417bb094f4da2afef7cc1426a
Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Date:   Sun Apr 6 14:18:32 2014 -0500

    Make shared library work on Cygwin/MinGW
    
    Weak symbols on PE platforms do not work the same way as on ELF
    platforms, hence we have been unable to have a fully functional shared
    libXfont until now.  This patch works around these issues so that we
    can fix that.
    
    In summary, only when compiling shared libraries on NO_WEAK_SYMBOLS
    platforms, when the first stub is called, the invoking program is first
    checked to determine if it exports the stubbed functions.  Then, for
    every stub call, if the function is exported by the loader, it is called
    instead of the stub code.
    
    serverClient and serverGeneration are data pointers, and therefore are
    replaced by getter functions. ErrorF is variadic, so the override is
    routed through VErrorF instead. FatalError has no va_list equivalent,
    but it is not actually used in libXfont and therefore should be safe to
    remove.
    
    This requires all X servers to export their symbols, which requires
    forthcoming patches for hw/xwin and xfs; the other xservers (including
    tigervnc) already do this via LD_EXPORT_SYMBOLS_FLAG.
    
    Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
    Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
    Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit 783a406d6258509abfbdc54c0b32366dcaf13044
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Apr 21 13:37:00 2014 -0700

    Use default glyphs when getting 16-bit font with 8-bit text
    
    When accessing a 16-bit font with firstRow > 0 with 8-bit text, check
    to see if the font has a default character and return that for every
    incoming character.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit e8d20171fe04dbdc5f97739d5a59e02f0b091ba0
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 15 23:04:23 2014 -0700

    Don't build unused code in bitmapfunc.c if all bitmap formats are disabled
    
    If the only bitmaps we support are builtins, don't need the code to
    register all the bitmap font file handlers.
    
    Fixes gcc warnings:
    bitmapfunc.c:110:1: warning: 'BitmapOpenBitmap' defined but not used [-Wunused-function]
     BitmapOpenBitmap (FontPathElementPtr fpe, FontPtr *ppFont, int flags,
     ^
    bitmapfunc.c:155:1: warning: 'BitmapGetInfoBitmap' defined but not used [-Wunused-function]
     BitmapGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
     ^
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rémi Cardona <remi@gentoo.org>

commit c2b7758d268fd98e09c3e66a0e7717b47ff12a47
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 15 22:44:38 2014 -0700

    Don't compile bitmap source files for disabled formats
    
    pcfread.c is a special case - it's needed for either reading pcf files
    from disk (--enable-pcfformat) or from the builtin fonts in memory
    (--enable-builtins), so needed a new AM_CONDITIONAL case.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rémi Cardona <remi@gentoo.org>

commit a81f1a9bd3cd0a9d45d93d5b9e392b4e08ac60f7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 15 20:43:34 2014 -0700

    Drop imake/monolithic compatibility #define mapping
    
    Require the #defines from configure.ac now that we're not sharing source
    with the imake builds any longer.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rémi Cardona <remi@gentoo.org>

commit 37595cfd4feaf031552d66f96dc6d58686f9c851
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 15 20:26:41 2014 -0700

    Change default to disabling SNF support
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rémi Cardona <remi@gentoo.org>

commit 9f677e55c7bf07df280427f127af21e5b70f1e03
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 15 20:21:29 2014 -0700

    Use AS_HELP_STRING to provide help for AC_ARG_ENABLE & AC_ARG_WITH options
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rémi Cardona <remi@gentoo.org>

commit d338f81df1e188eb16e1d6aeea7f4800f89c1218
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 2 19:24:17 2014 -0700

    CVE-2014-0210: unvalidated length fields in fs_read_list_info()
    
    fs_read_list_info() parses a reply from the font server.  The reply
    contains a number of additional data items with embedded length or
    count fields, none of which are validated. This can cause out of
    bound reads when looping over these items in the reply.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 5fa73ac18474be3032ee7af9c6e29deab163ea39
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri May 2 19:24:17 2014 -0700

    CVE-2014-0210: unvalidated length fields in fs_read_list()
    
    fs_read_list() parses a reply from the font server.  The reply
    contains a list of strings with embedded length fields, none of
    which are validated. This can cause out of bound reads when looping
    over the strings in the reply.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 520683652564c2a4e42328ae23eef9bb63271565
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:03:24 2014 -0700

    CVE-2014-0210: unvalidated length fields in fs_read_glyphs()
    
    fs_read_glyphs() parses a reply from the font server.  The reply
    contains embedded length fields, none of which are validated.
    This can cause out of bound reads when looping over the glyph
    bitmaps in the reply.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit a3f21421537620fc4e1f844a594a4bcd9f7e2bd8
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:03:05 2014 -0700

    CVE-2014-0210: unvalidated length fields in fs_read_extent_info()
    
    Looping over the extents in the reply could go past the end of the
    reply buffer if the reply indicated more extents than could fit in
    the specified reply length.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit a42f707f8a62973f5e8bbcd08afb10a79e9cee33
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:54 2014 -0700

    CVE-2014-0211: integer overflow in fs_alloc_glyphs()
    
    fs_alloc_glyphs() is a malloc wrapper used by the font code.
    It contains a classic integer overflow in the malloc() call,
    which can cause memory corruption.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit c578408c1fd4db09e4e3173f8a9e65c81cc187c1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:42 2014 -0700

    CVE-2014-0211: integer overflow in fs_read_extent_info()
    
    fs_read_extent_info() parses a reply from the font server.
    The reply contains a 32bit number of elements field which is used
    to calculate a buffer length. There is an integer overflow in this
    calculation which can lead to memory corruption.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 491291cabf78efdeec8f18b09e14726a9030cc8f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:34 2014 -0700

    CVE-2014-0210: unvalidated length fields in fs_read_query_info()
    
    fs_read_query_info() parses a reply from the font server.  The reply
    contains embedded length fields, none of which are validated.  This
    can cause out of bound reads in either fs_read_query_info() or in
    _fs_convert_props() which it calls to parse the fsPropInfo in the reply.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 0f1a5d372c143f91a602bdf10c917d7eabaee09b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:25 2014 -0700

    CVE-2014-0211: Integer overflow in fs_get_reply/_fs_start_read
    
    fs_get_reply() would take any reply size, multiply it by 4 and pass to
    _fs_start_read.  If that size was bigger than the current reply buffer
    size, _fs_start_read would add it to the existing buffer size plus the
    buffer size increment constant and realloc the buffer to that result.
    
    This math could overflow, causing the code to allocate a smaller
    buffer than the amount it was about to read into that buffer from
    the network.  It could also succeed, allowing the remote font server
    to cause massive allocations in the X server, possibly using up all
    the address space in a 32-bit X server, allowing the triggering of
    other bugs in code that fails to handle malloc failure properly.
    
    This patch protects against both problems, by disconnecting any
    font server trying to feed us more than (the somewhat arbitrary)
    64 mb in a single reply.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit cbb64aef35960b2882be721f4b8fbaa0fb649d12
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:12 2014 -0700

    CVE-2014-0210: unvalidated lengths when reading replies from font server
    
    Functions to handle replies to font server requests were casting replies
    from the generic form to reply specific structs without first checking
    that the reply was at least as long as the struct being cast to.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 891e084b26837162b12f841060086a105edde86d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:02:00 2014 -0700

    CVE-2014-0210: unvalidated length in _fs_recv_conn_setup()
    
    The connection setup reply from the font server can include a list
    of alternate servers to contact if this font server stops working.
    
    The reply specifies a total size of all the font server names, and
    then provides a list of names. _fs_recv_conn_setup() allocated the
    specified total size for copying the names to, but didn't check to
    make sure it wasn't copying more data to that buffer than the size
    it had allocated.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 05c8020a49416dd8b7510cbba45ce4f3fc81a7dc
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:01:48 2014 -0700

    CVE-2014-0209: integer overflow of realloc() size in lexAlias()
    
    lexAlias() reads from a file in a loop. It does this by starting with a
    64 byte buffer.  If that size limit is hit, it does a realloc of the
    buffer size << 1, basically doubling the needed length every time the
    length limit is hit.
    
    Eventually, this will shift out to 0 (for a length of ~4gig), and that
    length will be passed on to realloc().  A length of 0 (with a valid
    pointer) causes realloc to free the buffer on most POSIX platforms,
    but the caller will still have a pointer to it, leading to use after
    free issues.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 2f5e57317339c526e6eaee1010b0e2ab8089c42e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 25 23:01:11 2014 -0700

    CVE-2014-0209: integer overflow of realloc() size in FontFileAddEntry()
    
    FontFileReadDirectory() opens a fonts.dir file, and reads over every
    line in an fscanf loop.  For each successful entry read (font name,
    file name) a call is made to FontFileAddFontFile().
    
    FontFileAddFontFile() will add a font file entry (for the font name
    and file) each time it’s called, by calling FontFileAddEntry().
    FontFileAddEntry() will do the actual adding.  If the table it has
    to add to is full, it will do a realloc, adding 100 more entries
    to the table size without checking to see if that will overflow the
    int used to store the size.
    
    Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>

commit 2a5111af9e03a55bd099c6c3a5b9a7fd3dfce76f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Apr 24 22:11:08 2014 -0700

    fs_send_open_font needs to allow namelen of 0 when FontReopen is set
    
    When _fs_load_glyphs calls fs_send_open_font with FontReopen set, it
    passes a NULL name and namelen of 0, since fs_send_open_font is going
    to reuse the previous name.
    
    This overly restrictive check was added in XFree86 4.3.99.12:
    http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c.diff?r1=3.23&r2=3.24
    http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c?rev=3.24&content-type=text/vnd.viewcvs-markup
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 77902e1422315963364fcba3736ff9b5b0f32d47
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Apr 22 23:49:29 2014 -0700

    Clean up warnings when src/fc is built with -DDEBUG
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit f75f7bde4cedc36d5ca1289988b3daebb80528d2
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Apr 22 23:45:41 2014 -0700

    Allow enabling src/fc DEBUG helpers via CPPFLAGS
    
    Instead of editing fsio.h to turn on debugging logs, just add
    -DDEBUG to CPPFLAGS when building.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 21f5d3ec9d833b8bce08d0749b8001e1e88544ac
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Apr 21 22:05:20 2014 -0700

    Bump version to 1.4.99.0 for master branch (to become 1.5)
    
    libXfont 1.5.0 will be synchronized with the fontsproto 2.1.3 API
    changes needed for xorg-server 1.16 branch.
    
    libXfont 1.4.x will be left for stable release branch for older
    Xserver releases.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 5a398a55ccdd92d0ff05793692ef8e57f3a50198
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Apr 20 18:10:07 2014 -0700

    Require fontsproto 2.1.3 for matching function prototypes
    
    Building current libXfont git against fontsproto 2.1.2 causes clang
    complaints of:
    
    patcache.c:130:1: error: conflicting types for 'CacheFontPattern'
    CacheFontPattern (FontPatternCachePtr cache,
    ^
    patcache.c:176:1: error: conflicting types for 'FindCachedFontPattern'
    FindCachedFontPattern (FontPatternCachePtr cache,
    ^
    
    due to the constification of arguments not matching.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Thomas Klausner <wiz@NetBSD.org>

commit c77a0784bdfc8c178f0742689cf6ae02a2fce37f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Apr 20 17:59:14 2014 -0700

    Check if pointer returned by BufFileCreate is NULL before writing to it
    
    Fixes clang analyzer warning:
    
    bufio.c:165:13: warning: Access to field 'bufp' results in a dereference
     of a null pointer (loaded from variable 'f')
        f->bufp = f->buffer;
        ~       ^
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Thomas Klausner <wiz@NetBSD.org>

commit c8855746aec2a9b732502da0ca3258b4e701c61a
Author: Peter Harris <pharris@opentext.com>
Date:   Mon Apr 7 14:25:02 2014 -0400

    Fix buffer read overrun
    
    "FreeType" is only eight bytes long. The atom "FreeType\x00\x??" is
    probably not what the author intended.
    
    Signed-off-by: Peter Harris <pharris@opentext.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit a96cc1f032a059da89319ceccb6659c8edd446fb
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Nov 15 21:46:15 2013 +0900

    Warning fixes.
    
    Many const char issues.
    
    One extra 'i' declared in ScaleFont; we can just use the same 'i' as
    exists at the top level scope.
    
    Also ignore bad-function-cast in ftfuncs.c and bitscale.c because
    we're casting the return value from floor or ceil from double to
    int. As floor and ceil are kinda designed to generate integer results,
    it's pretty clear that we're doing what we want and that the compiler
    is generating noise. I'm not sure why bad-function-cast is ever a good
    warning to turn on, but I'll leave that for another day.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>

commit 2a3429413df27224ceeddd22500ce43b5431d698
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 17 22:25:56 2014 -0800

    Add note to README declaring snf fonts to be deprecated
    
    pcf was introduced to replace snf in X11R5 in 1991:
        http://www.x.org/wiki/X11R5/#index56h3
    22 years is long enough to move off a font format that was alive for
    less than a decade before that, and widely considered a bad idea even
    then:
        http://www.faqs.org/faqs/fonts-faq/part15/
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

commit efcb136a03f642fba7e289e25d5dcf609bd13f07
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 17 22:25:01 2014 -0800

    Add notes to README about various font formats & configure options
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

commit 5d696738c2ab901bdef004169799bb63939fa7b5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 17 22:00:25 2014 -0800

    Correct comment in configure.ac about scalable font support
    
    Bitstream Speedo support was removed in commit d50de26430c1a114a.
    All scalable font support now goes through FreeType, which can
    also handle some bitmap font formats as well.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>

commit 6371fcf2b60e48605ed59f098d1e642e35b1d142
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 7 23:09:08 2014 -0800

    Remove redundant setting of 'len' in SPropRecValList_add_by_font_cap
    
    Found by cppcheck 1.63:
    [FreeType/xttcap.c:621] -> [FreeType/xttcap.c:624]: (performance)
     Variable 'len' is reassigned a value before the old one has been used.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

commit 63c7ac4dbb739e51d55249e71282699e5e0d7e1d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 7 22:58:22 2014 -0800

    Initialize (unused) data field in fsListCataloguesReq before sending it.
    
    Quiets cppcheck 1.63 warning:
    [fc/fserve.c:2972]: (error) Uninitialized variable: lcreq
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

commit d279ffa49284b5e5f787f76edbe8c52226534a64
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 7 22:29:04 2014 -0800

    Remove redundant declaration of FontFileStartListFonts()
    
    Fixes gcc warning:
    catalogue.c:336:1: warning: redundant redeclaration of
     'FontFileStartListFonts' [-Wredundant-decls]
    In file included from ../../include/X11/fonts/fntfilst.h:40:0,
                     from catalogue.c:32:
    ../../include/X11/fonts/fntfil.h:92:12: note: previous declaration
     of 'FontFileStartListFonts' was here
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>

commit 2fb6295ace36394732815aca5aef1a85e63de56c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Jan 7 22:15:50 2014 -0800

    Fix unused variable 'dir' warnings
    
    catalogue.c: In function 'CatalogueOpenFont':
    catalogue.c:290:22: warning: variable 'dir' set but not used [-Wunused-but-set-variable]
    catalogue.c: In function 'CatalogueListFonts':
