diff options
author | kwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09> | 2012-03-02 19:24:03 +0800 |
---|---|---|
committer | kwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09> | 2012-03-02 19:24:03 +0800 |
commit | 24639888f8a1abdd99b8acc450e2a326d30ebe9b (patch) | |
tree | 8ec3407369fe975a36a11bc37c8d3c8894b88de7 /x11-fonts/libXfont | |
parent | b6ae3c56df54fbc04e16074f16800cd5f980631c (diff) | |
download | xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.gz xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.bz2 xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.lz xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.xz xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.tar.zst xorg-devel-ports-24639888f8a1abdd99b8acc450e2a326d30ebe9b.zip |
Update xfs to 1.1.2.
Add upstream patches to libXfont to fix the build with xfs and to plug
security issue [1].
Obtained from: libXfont upstream [1]
http://cgit.freedesktop.org/xorg/lib/libXfont/commit/?id=bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa
Security: CVE-2011-2895 [1]
git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@431 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'x11-fonts/libXfont')
-rw-r--r-- | x11-fonts/libXfont/Makefile | 24 | ||||
-rw-r--r-- | x11-fonts/libXfont/distinfo | 2 | ||||
-rw-r--r-- | x11-fonts/libXfont/files/patch-fontmisc.h | 25 | ||||
-rw-r--r-- | x11-fonts/libXfont/files/patch-src_fontfile_decompress.c | 99 | ||||
-rw-r--r-- | x11-fonts/libXfont/files/patch-src_util_atom.c | 30 | ||||
-rw-r--r-- | x11-fonts/libXfont/pkg-descr | 3 | ||||
-rw-r--r-- | x11-fonts/libXfont/pkg-plist | 21 |
7 files changed, 204 insertions, 0 deletions
diff --git a/x11-fonts/libXfont/Makefile b/x11-fonts/libXfont/Makefile new file mode 100644 index 0000000..96a9eb9 --- /dev/null +++ b/x11-fonts/libXfont/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: libXfont +# Date Created: 29 Oct, 2003 +# Whom: Eric Anholt <anholt@FreeBSD.org> +# +# $FreeBSD: ports/x11-fonts/libXfont/Makefile,v 1.27 2011/11/09 15:26:02 miwi Exp $ +# + +PORTNAME= libXfont +PORTVERSION= 1.4.4 +PORTREVISION= 1 +PORTEPOCH= 1 +CATEGORIES= x11-fonts + +MAINTAINER= x11@FreeBSD.org +COMMENT= X font libary + +LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 + +XORG_CAT= lib +USE_XORG= xproto:both xtrans fontsproto:both fontenc + +CONFIGURE_ARGS=--without-xmlto --disable-devel-docs + +.include <bsd.port.mk> diff --git a/x11-fonts/libXfont/distinfo b/x11-fonts/libXfont/distinfo new file mode 100644 index 0000000..41f79ca --- /dev/null +++ b/x11-fonts/libXfont/distinfo @@ -0,0 +1,2 @@ +SHA256 (xorg/lib/libXfont-1.4.4.tar.bz2) = a2065f5f66882f7a9cb0eb674e16d284da48e449af443eda272e99832be8239a +SIZE (xorg/lib/libXfont-1.4.4.tar.bz2) = 440022 diff --git a/x11-fonts/libXfont/files/patch-fontmisc.h b/x11-fonts/libXfont/files/patch-fontmisc.h new file mode 100644 index 0000000..3932c2d --- /dev/null +++ b/x11-fonts/libXfont/files/patch-fontmisc.h @@ -0,0 +1,25 @@ +From 3715cd752bac912a56aa1cbb9dd874624a709aab Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun, 02 Oct 2011 16:16:05 +0000 +Subject: Add const attributes to fix gcc -Wwrite-strings warnings + +Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +--- +(limited to 'include/X11/fonts/fontmisc.h') + +diff --git a/include/X11/fonts/fontmisc.h b/include/X11/fonts/fontmisc.h +index 3da1e63..73a8247 100644 +--- include/X11/fonts/fontmisc.h ++++ include/X11/fonts/fontmisc.h +@@ -52,7 +52,7 @@ in this Software without prior written authorization from The Open Group. + #define FALSE 0 + #endif + +-extern Atom MakeAtom ( char *string, unsigned len, int makeit ); ++extern Atom MakeAtom ( const char *string, unsigned len, int makeit ); + extern int ValidAtom ( Atom atom ); + extern char *NameForAtom (Atom atom); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c new file mode 100644 index 0000000..fe04e06 --- /dev/null +++ b/x11-fonts/libXfont/files/patch-src_fontfile_decompress.c @@ -0,0 +1,99 @@ +From bd48ad11fd11412c62c3ac8ed5d52c4f10a985aa Mon Sep 17 00:00:00 2001 +From: Joerg Sonnenberger <joerg@britannica.bec.de> +Date: Sun, 21 Aug 2011 16:51:53 +0000 +Subject: Do proper input validation to fix for CVE-2011-2895. + +It ensures that all valid input can be decompressed, checks that the +overflow conditions doesn't happen and generally tightens the +validation of the LZW stream and doesn't pessimize the inner loop for +no good reason. It's derived from a change in libarchive from 2004. + +Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> +Reviewed-by: Tomas Hoger <thoger@redhat.com> +--- +--- src/fontfile/decompress.c.orig 2011-08-10 22:22:01.000000000 +0200 ++++ src/fontfile/decompress.c 2012-03-02 11:59:57.000000000 +0100 +@@ -97,7 +97,7 @@ + #define FIRST 257 /* first free entry */ + #define CLEAR 256 /* table clear output code */ + +-#define STACK_SIZE 8192 ++#define STACK_SIZE 65300 + + typedef struct _compressedFILE { + BufFilePtr file; +@@ -178,14 +178,12 @@ + file->tab_suffix[code] = (char_type) code; + } + file->free_ent = ((file->block_compress) ? FIRST : 256 ); ++ file->oldcode = -1; + file->clear_flg = 0; + file->offset = 0; + file->size = 0; + file->stackp = file->de_stack; + bzero(file->buf, BITS); +- file->finchar = file->oldcode = getcode (file); +- if (file->oldcode != -1) +- *file->stackp++ = file->finchar; + return BufFileCreate ((char *) file, + BufCompressedFill, + 0, +@@ -230,9 +228,6 @@ + if (buf == bufend) + break; + +- if (oldcode == -1) +- break; +- + code = getcode (file); + if (code == -1) + break; +@@ -241,26 +236,34 @@ + for ( code = 255; code >= 0; code-- ) + file->tab_prefix[code] = 0; + file->clear_flg = 1; +- file->free_ent = FIRST - 1; +- if ( (code = getcode (file)) == -1 ) /* O, untimely death! */ +- break; ++ file->free_ent = FIRST; ++ oldcode = -1; ++ continue; + } + incode = code; + /* + * Special case for KwKwK string. + */ + if ( code >= file->free_ent ) { ++ if ( code > file->free_ent || oldcode == -1 ) { ++ /* Bad stream. */ ++ return BUFFILEEOF; ++ } + *stackp++ = finchar; + code = oldcode; + } ++ /* ++ * The above condition ensures that code < free_ent. ++ * The construction of tab_prefeixof in turn guarantees that ++ * each iteration decreased code and therefore stack usage is ++ * bound by 1 << BITS - 256. ++ */ + + /* + * Generate output characters in reverse order + */ + while ( code >= 256 ) + { +- if (stackp - de_stack >= STACK_SIZE - 1) +- return BUFFILEEOF; + *stackp++ = file->tab_suffix[code]; + code = file->tab_prefix[code]; + } +@@ -270,7 +273,7 @@ + /* + * Generate the new entry. + */ +- if ( (code=file->free_ent) < file->maxmaxcode ) { ++ if ( (code=file->free_ent) < file->maxmaxcode && oldcode != -1) { + file->tab_prefix[code] = (unsigned short)oldcode; + file->tab_suffix[code] = finchar; + file->free_ent = code+1; diff --git a/x11-fonts/libXfont/files/patch-src_util_atom.c b/x11-fonts/libXfont/files/patch-src_util_atom.c new file mode 100644 index 0000000..c417479 --- /dev/null +++ b/x11-fonts/libXfont/files/patch-src_util_atom.c @@ -0,0 +1,30 @@ +From 3715cd752bac912a56aa1cbb9dd874624a709aab Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun, 02 Oct 2011 16:16:05 +0000 +Subject: Add const attributes to fix gcc -Wwrite-strings warnings + +Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> +Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> +--- +(limited to 'src/util/atom.c') + +--- src/util/atom.c.orig 2010-10-07 06:12:21.000000000 +0200 ++++ src/util/atom.c 2012-03-02 12:09:16.000000000 +0100 +@@ -54,7 +54,7 @@ + static Atom lastAtom; + + static int +-Hash(char *string, int len) ++Hash(const char *string, int len) + { + int h; + +@@ -147,7 +147,7 @@ + #endif + + weak Atom +-MakeAtom(char *string, unsigned len, int makeit) ++MakeAtom(const char *string, unsigned len, int makeit) + { + AtomListPtr a; + int hash; diff --git a/x11-fonts/libXfont/pkg-descr b/x11-fonts/libXfont/pkg-descr new file mode 100644 index 0000000..8353c67 --- /dev/null +++ b/x11-fonts/libXfont/pkg-descr @@ -0,0 +1,3 @@ +This package contains the X font libary + +WWW: http://www.freedesktop.org/Software/xlibs diff --git a/x11-fonts/libXfont/pkg-plist b/x11-fonts/libXfont/pkg-plist new file mode 100644 index 0000000..213eebd --- /dev/null +++ b/x11-fonts/libXfont/pkg-plist @@ -0,0 +1,21 @@ +include/X11/fonts/bdfint.h +include/X11/fonts/bitmap.h +include/X11/fonts/bufio.h +include/X11/fonts/fntfil.h +include/X11/fonts/fntfilio.h +include/X11/fonts/fntfilst.h +include/X11/fonts/fontconf.h +include/X11/fonts/fontencc.h +include/X11/fonts/fontmisc.h +include/X11/fonts/fontshow.h +include/X11/fonts/fontutil.h +include/X11/fonts/fontxlfd.h +include/X11/fonts/ft.h +include/X11/fonts/ftfuncs.h +include/X11/fonts/pcf.h +lib/libXfont.a +lib/libXfont.la +lib/libXfont.so +lib/libXfont.so.1 +libdata/pkgconfig/xfont.pc +@dirrmtry include/X11/fonts |