head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.32 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.30 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.28 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.26 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.24 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.22 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.20 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.18 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.16 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.14 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.12 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.10 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.8 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.6 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.4 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.2 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.3.0.8 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.6 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.4 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.2 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.2.0.10 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.8 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.6 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.4 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.2 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.1.1.1.0.2 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2006.09.27.15.18.17; author joerg; state dead; branches; next 1.3; 1.3 date 2005.09.18.19.51.55; author xtraeme; state Exp; branches; next 1.2; 1.2 date 2004.03.28.22.06.16; author xtraeme; state dead; branches; next 1.1; 1.1 date 2004.01.24.08.47.32; author xtraeme; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.01.24.08.47.32; author xtraeme; state Exp; branches; next ; desc @@ 1.4 log @Remove XFree86. @ text @$NetBSD: patch-at,v 1.3 2005/09/18 19:51:55 xtraeme Exp $ Single patch to fix CAN-2005-2495. --- programs/Xserver/afb/afbpixmap.c.orig Fri Apr 23 20:59:39 2004 +++ programs/Xserver/afb/afbpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -73,10 +73,14 @@@@ int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; paddedWidth = BitmapBytePad(width); + + if (paddedWidth > 32767 || height > 32767 || depth > 4) + return NullPixmap; + datasize = height * paddedWidth * depth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) --- programs/Xserver/cfb/cfbpixmap.c.orig Fri Apr 23 21:00:12 2004 +++ programs/Xserver/cfb/cfbpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -70,10 +70,13 @@@@ int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; paddedWidth = PixmapBytePad(width, depth); + + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; datasize = height * paddedWidth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) --- programs/Xserver/dix/dispatch.c.orig Mon Dec 13 02:23:05 2004 +++ programs/Xserver/dix/dispatch.c Sun Sep 18 04:56:02 2005 @@@@ -1506,6 +1506,23 @@@@ client->errorValue = 0; return BadValue; } + if (stuff->width > 32767 || stuff->height > 32767) + { + /* It is allowed to try and allocate a pixmap which is larger than + * 32767 in either dimension. However, all of the framebuffer code + * is buggy and does not reliably draw to such big pixmaps, basically + * because the Region data structure operates with signed shorts + * for the rectangles in it. + * + * Furthermore, several places in the X server computes the + * size in bytes of the pixmap and tries to store it in an + * integer. This integer can overflow and cause the allocated size + * to be much smaller. + * + * So, such big pixmaps are rejected here with a BadAlloc + */ + return BadAlloc; + } if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; --- programs/Xserver/dix/pixmap.c.orig Fri Apr 23 21:04:44 2004 +++ programs/Xserver/dix/pixmap.c Sun Sep 18 04:56:02 2005 @@@@ -126,6 +126,9 @@@@ unsigned size; int i; + if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) + return NullPixmap; + pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; --- programs/Xserver/fb/fbpixmap.c.orig Mon Aug 9 05:40:50 2004 +++ programs/Xserver/fb/fbpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -32,12 +32,14 @@@@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; int adjust; int base; paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; datasize = height * paddedWidth; #ifdef PIXPRIV base = pScreen->totalPixmapSize; --- programs/Xserver/hw/xfree86/xaa/xaaInit.c.orig Fri Jul 30 22:30:56 2004 +++ programs/Xserver/hw/xfree86/xaa/xaaInit.c Sun Sep 18 04:56:02 2005 @@@@ -498,6 +498,9 @@@@ XAAPixmapPtr pPriv; PixmapPtr pPix = NULL; int size = w * h; + + if (w > 32767 || h > 32767) + return NullPixmap; if (!infoRec->offscreenDepthsInitialized) XAAInitializeOffscreenDepths (pScreen); --- programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c.orig Fri Apr 23 21:54:17 2004 +++ programs/Xserver/hw/xfree86/xf4bpp/ppcPixmap.c Sun Sep 18 04:56:02 2005 @@@@ -85,7 +85,7 @@@@ int depth ; { register PixmapPtr pPixmap = (PixmapPtr)NULL; - int size ; + size_t size ; TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d)\n", pScreen, width, height, depth)) ; @@@@ -93,6 +93,10 @@@@ return (PixmapPtr) NULL ; size = PixmapBytePad(width, depth); + + if (size / 4 > 32767 || height > 32767) + return (PixmapPtr) NULL ; + pPixmap = AllocatePixmap (pScreen, (height * size)); if ( !pPixmap ) --- programs/Xserver/ilbm/ilbmpixmap.c.orig Fri Apr 23 21:54:22 2004 +++ programs/Xserver/ilbm/ilbmpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -75,10 +75,12 @@@@ int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; paddedWidth = BitmapBytePad(width); + if (paddedWidth > 32767 || height > 32767 || depth > 4) + return NullPixmap; datasize = height * paddedWidth * depth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) --- programs/Xserver/iplan2p4/iplpixmap.c.orig Fri Apr 23 21:54:24 2004 +++ programs/Xserver/iplan2p4/iplpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -74,12 +74,14 @@@@ int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; int ipad=INTER_PLANES*2 - 1; paddedWidth = PixmapBytePad(width, depth); paddedWidth = (paddedWidth + ipad) & ~ipad; + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; datasize = height * paddedWidth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) --- programs/Xserver/mfb/mfbpixmap.c.orig Fri Nov 14 17:48:57 2003 +++ programs/Xserver/mfb/mfbpixmap.c Sun Sep 18 04:56:02 2005 @@@@ -72,12 +72,14 @@@@ int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; if (depth != 1) return NullPixmap; paddedWidth = BitmapBytePad(width); + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; datasize = height * paddedWidth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) @ 1.3 log @Apply patch from FreeBSD ports to fix CAN-2005-2495. Bump BUILDLINK_RECOMMENDED and PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Upgrade XFree86 packages to 4.4.0. To see a full list of changes, please review: http://xfree86.org/4.4.0/RELNOTES.html These packages has been tested under NetBSD 1.6/-current, FreeBSD 4.x/5.x, and GNU/Linux (i386) by Jeremy C. Reed, Michal Pasternak and myself. @ text @d1 1 a1 1 $NetBSD: patch-at,v 1.1 2004/01/24 08:47:32 xtraeme Exp $ d3 70 a72 5 --- programs/Xserver/hw/xfree86/xf86config/xf86config.c.orig 2003-07-09 13:48:58.000000000 +0000 +++ programs/Xserver/hw/xfree86/xf86config/xf86config.c 2003-07-09 13:49:42.000000000 +0000 @@@@ -176,6 +176,9 @@@@ #endif #define CONFIGNAME XCONFIGFILE d74 31 a104 1 +/* Comment this out for now ... */ d106 55 a160 9 +#if 0 #ifndef XF86_VERSION_MAJOR #ifdef XVERSION #if XVERSION > 40000000 @@@@ -187,6 +190,7 @@@@ #define XF86_VERSION_MAJOR 4 #endif #endif +#endif d162 17 d180 8 a187 1 int config_mousetype; /* Mouse. */ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Initial import of XFree86-libs-4.3.0 from pkgsrc-wip. This package contains the XFree86 include header files and shared library files. @ text @@