head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.24 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.22 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.20 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.18 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.16 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.14 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.12 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.10 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.8 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.6 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.4 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.2 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.1.0.10 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.8 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.6 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.4 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.2; locks; strict; comment @# @; 1.2 date 2007.08.17.20.25.35; author joerg; state dead; branches; next 1.1; 1.1 date 2006.08.23.00.11.08; author joerg; state Exp; branches 1.1.2.1; next ; 1.1.2.1 date 2006.08.23.00.11.08; author salo; state dead; branches; next 1.1.2.2; 1.1.2.2 date 2006.08.23.23.30.32; author salo; state Exp; branches; next ; desc @@ 1.2 log @To quote Johnny Lam: "In modular-xorg we trust" Remove xorg 6.9 packages from pkgsrc. @ text @$NetBSD: patch-br,v 1.1 2006/08/23 00:11:08 joerg Exp $ --- lib/font/bitmap/pcfread.c.orig 2005-07-09 08:36:12.000000000 +0200 +++ lib/font/bitmap/pcfread.c @@@@ -45,6 +45,7 @@@@ from The Open Group. #endif #include +#include void pcfError(const char* message, ...) @@@@ -133,6 +134,10 @@@@ pcfReadTOC(FontFilePtr file, int *countp return (PCFTablePtr) NULL; count = pcfGetLSB32(file); if (IS_EOF(file)) return (PCFTablePtr) NULL; + if (count < 0 || count > INT32_MAX / sizeof(PCFTableRec)) { + pcfError("pcfReadTOC(): invalid file format\n"); + return NULL; + } tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); if (!tables) { pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); @@@@ -252,6 +257,10 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) goto Bail; nprops = pcfGetINT32(file, format); + if (nprops <= 0 || nprops > INT32_MAX / sizeof(FontPropRec)) { + pcfError("pcfGetProperties(): invalid nprops value (%d)\n", nprops); + goto Bail; + } if (IS_EOF(file)) goto Bail; props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); if (!props) { @@@@ -267,6 +276,13 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, props[i].name = pcfGetINT32(file, format); isStringProp[i] = pcfGetINT8(file, format); props[i].value = pcfGetINT32(file, format); + if (props[i].name < 0 + || (isStringProp[i] != 0 && isStringProp[i] != 1) + || (isStringProp[i] && props[i].value < 0)) { + pcfError("pcfGetProperties(): invalid file format %d %d %d\n", + props[i].name, isStringProp[i], props[i].value); + goto Bail; + } if (IS_EOF(file)) goto Bail; } /* pad the property array */ @@@@ -282,6 +298,7 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, } if (IS_EOF(file)) goto Bail; string_size = pcfGetINT32(file, format); + if (string_size < 0) goto Bail; if (IS_EOF(file)) goto Bail; strings = (char *) xalloc(string_size); if (!strings) { @@@@ -422,6 +439,10 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f else nmetrics = pcfGetINT16(file, format); if (IS_EOF(file)) goto Bail; + if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { + pcfError("pcfReadFont(): invalid file format\n"); + goto Bail; + } metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); @@@@ -447,7 +468,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f nbitmaps = pcfGetINT32(file, format); if (nbitmaps != nmetrics || IS_EOF(file)) goto Bail; - + /* nmetrics is alreadt ok, so nbitmap also is */ offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); if (!offsets) { pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); @@@@ -461,6 +482,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f for (i = 0; i < GLYPHPADOPTIONS; i++) { bitmapSizes[i] = pcfGetINT32(file, format); if (IS_EOF(file)) goto Bail; + if (bitmapSizes[i] < 0) goto Bail; } sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; @@@@ -536,6 +558,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f if (IS_EOF(file)) goto Bail; if (nink_metrics != nmetrics) goto Bail; + /* nmetrics already checked */ ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); if (!ink_metrics) { pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); @@@@ -809,6 +832,10 @@@@ pmfReadFont(FontPtr pFont, FontFilePtr f else nmetrics = pcfGetINT16(file, format); if (IS_EOF(file)) goto Bail; + if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { + pcfError("pmfReadFont(): invalid file format\n"); + goto Bail; + } metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); @ 1.1 log @Actually add the patch as well. @ text @d1 1 a1 1 $NetBSD$ @ 1.1.2.1 log @file patch-br was added on branch pkgsrc-2006Q2 on 2006-08-23 00:11:08 +0000 @ text @d1 103 @ 1.1.2.2 log @Pullup ticket 1804 - requested by joerg security fix and sync with HEAD for xorg Revisions pulled up: - pkgsrc/meta-pkgs/xorg/Makefile.common 1.41, 1.42 - pkgsrc/x11/xorg-imake/Makefile 1.29, 1.30 - pkgsrc/x11/xorg-imake/distinfo 1.21 - pkgsrc/x11/xorg-imake/patches/patch-ac 1.8 - pkgsrc/x11/xorg-libs/Makefile 1.37, 1.39, 1.40, 1.41 - pkgsrc/x11/xorg-libs/PLIST 1.8, 1.9, 1.10 - pkgsrc/x11/xorg-libs/distinfo 1.48, 1.49, 1.50, 1.51, 1.52 - pkgsrc/x11/xorg-libs/patches/patch-ac 1.10 - pkgsrc/x11/xorg-libs/patches/patch-ad 1.6 - pkgsrc/x11/xorg-libs/patches/patch-au 1.3 - pkgsrc/x11/xorg-libs/patches/patch-bq 1.1 - pkgsrc/x11/xorg-libs/patches/patch-br 1.1 - pkgsrc/x11/xorg-server/Makefile 1.45 Module Name: pkgsrc Committed By: rillig Date: Tue Jul 4 09:20:18 UTC 2006 Modified Files: pkgsrc/meta-pkgs/xorg: Makefile.common Log Message: Made a SUBST block much simpler. --- Module Name: pkgsrc Committed By: joerg Date: Mon Jul 17 17:06:59 UTC 2006 Modified Files: pkgsrc/x11/xorg-imake: Makefile Log Message: Since mkhtmlindex is now a Perl script, depend on Perl and replace the interpreter. Bump revision. --- Module Name: pkgsrc Committed By: minskim Date: Sun Jul 23 15:45:36 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: Makefile distinfo pkgsrc/x11/xorg-libs/patches: patch-au Log Message: Make this package build on platforms without native zlib by including zlib's buildlink3.mk. Thanks to Joerg Sonnenberger for review. --- Module Name: pkgsrc Committed By: minskim Date: Sun Jul 23 16:54:20 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: PLIST Log Message: Add missing entries for Linux. Approved by the maintainer. --- Module Name: pkgsrc Committed By: joerg Date: Mon Jul 24 14:11:13 UTC 2006 Modified Files: pkgsrc/meta-pkgs/xorg: Makefile.common pkgsrc/x11/xorg-libs: Makefile Log Message: Move zlib SUBST magic to Makefile.common, it is always needed. Fixes problems found by abs@@ --- Module Name: pkgsrc Committed By: minskim Date: Mon Jul 24 22:00:47 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: PLIST distinfo pkgsrc/x11/xorg-libs/patches: patch-ad Log Message: Set ForceNormalLib and SharedFontLib to YES regardless of Linux distribution, so that the same set of libraries are built on every Linux distribution. Thanks to Joerg Sonnenberger for guide and review. --- Module Name: pkgsrc Committed By: minskim Date: Wed Jul 26 16:02:21 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: Makefile PLIST Log Message: Add a missing file on Linux. Bump PKGREVISION. -- Module Name: pkgsrc Committed By: joerg Date: Mon Jul 31 16:39:42 UTC 2006 Modified Files: pkgsrc/x11/xorg-imake: Makefile distinfo pkgsrc/x11/xorg-imake/patches: patch-ac pkgsrc/x11/xorg-libs: Makefile distinfo pkgsrc/x11/xorg-libs/patches: patch-ac Log Message: Don't drop -fno-strict-aliasing on NetBSD/!i386. Fixes PR 34099. Bump revision of xorg-imake and xorg-libs. --- Module Name: pkgsrc Committed By: joerg Date: Mon Aug 14 09:54:39 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: distinfo Added Files: pkgsrc/x11/xorg-libs/patches: patch-bq Log Message: Don't install os.h and misc.h in server builds, it would override files from xorg-libs. --- Module Name: pkgsrc Committed By: joerg Date: Tue Aug 22 18:12:14 UTC 2006 Modified Files: pkgsrc/x11/xorg-libs: Makefile distinfo pkgsrc/x11/xorg-server: Makefile Log Message: Fix SA21450 using patch from Xorg CVS. Bump revisions of xorg-libs and xorg-server. --- Module Name: pkgsrc Committed By: joerg Date: Wed Aug 23 00:11:08 UTC 2006 Added Files: pkgsrc/x11/xorg-libs/patches: patch-br Log Message: Actually add the patch as well. @ text @a0 103 $NetBSD: patch-br,v 1.1.2.1 2006/08/23 23:30:32 salo Exp $ --- lib/font/bitmap/pcfread.c.orig 2005-07-09 08:36:12.000000000 +0200 +++ lib/font/bitmap/pcfread.c @@@@ -45,6 +45,7 @@@@ from The Open Group. #endif #include +#include void pcfError(const char* message, ...) @@@@ -133,6 +134,10 @@@@ pcfReadTOC(FontFilePtr file, int *countp return (PCFTablePtr) NULL; count = pcfGetLSB32(file); if (IS_EOF(file)) return (PCFTablePtr) NULL; + if (count < 0 || count > INT32_MAX / sizeof(PCFTableRec)) { + pcfError("pcfReadTOC(): invalid file format\n"); + return NULL; + } tables = (PCFTablePtr) xalloc(count * sizeof(PCFTableRec)); if (!tables) { pcfError("pcfReadTOC(): Couldn't allocate tables (%d*%d)\n", count, sizeof(PCFTableRec)); @@@@ -252,6 +257,10 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT)) goto Bail; nprops = pcfGetINT32(file, format); + if (nprops <= 0 || nprops > INT32_MAX / sizeof(FontPropRec)) { + pcfError("pcfGetProperties(): invalid nprops value (%d)\n", nprops); + goto Bail; + } if (IS_EOF(file)) goto Bail; props = (FontPropPtr) xalloc(nprops * sizeof(FontPropRec)); if (!props) { @@@@ -267,6 +276,13 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, props[i].name = pcfGetINT32(file, format); isStringProp[i] = pcfGetINT8(file, format); props[i].value = pcfGetINT32(file, format); + if (props[i].name < 0 + || (isStringProp[i] != 0 && isStringProp[i] != 1) + || (isStringProp[i] && props[i].value < 0)) { + pcfError("pcfGetProperties(): invalid file format %d %d %d\n", + props[i].name, isStringProp[i], props[i].value); + goto Bail; + } if (IS_EOF(file)) goto Bail; } /* pad the property array */ @@@@ -282,6 +298,7 @@@@ pcfGetProperties(FontInfoPtr pFontInfo, } if (IS_EOF(file)) goto Bail; string_size = pcfGetINT32(file, format); + if (string_size < 0) goto Bail; if (IS_EOF(file)) goto Bail; strings = (char *) xalloc(string_size); if (!strings) { @@@@ -422,6 +439,10 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f else nmetrics = pcfGetINT16(file, format); if (IS_EOF(file)) goto Bail; + if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { + pcfError("pcfReadFont(): invalid file format\n"); + goto Bail; + } metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { pcfError("pcfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); @@@@ -447,7 +468,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f nbitmaps = pcfGetINT32(file, format); if (nbitmaps != nmetrics || IS_EOF(file)) goto Bail; - + /* nmetrics is alreadt ok, so nbitmap also is */ offsets = (CARD32 *) xalloc(nbitmaps * sizeof(CARD32)); if (!offsets) { pcfError("pcfReadFont(): Couldn't allocate offsets (%d*%d)\n", nbitmaps, sizeof(CARD32)); @@@@ -461,6 +482,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f for (i = 0; i < GLYPHPADOPTIONS; i++) { bitmapSizes[i] = pcfGetINT32(file, format); if (IS_EOF(file)) goto Bail; + if (bitmapSizes[i] < 0) goto Bail; } sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)]; @@@@ -536,6 +558,7 @@@@ pcfReadFont(FontPtr pFont, FontFilePtr f if (IS_EOF(file)) goto Bail; if (nink_metrics != nmetrics) goto Bail; + /* nmetrics already checked */ ink_metrics = (xCharInfo *) xalloc(nink_metrics * sizeof(xCharInfo)); if (!ink_metrics) { pcfError("pcfReadFont(): Couldn't allocate ink_metrics (%d*%d)\n", nink_metrics, sizeof(xCharInfo)); @@@@ -809,6 +832,10 @@@@ pmfReadFont(FontPtr pFont, FontFilePtr f else nmetrics = pcfGetINT16(file, format); if (IS_EOF(file)) goto Bail; + if (nmetrics < 0 || nmetrics > INT32_MAX / sizeof(CharInfoRec)) { + pcfError("pmfReadFont(): invalid file format\n"); + goto Bail; + } metrics = (CharInfoPtr) xalloc(nmetrics * sizeof(CharInfoRec)); if (!metrics) { pcfError("pmfReadFont(): Couldn't allocate metrics (%d*%d)\n", nmetrics, sizeof(CharInfoRec)); @