CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: msaitoh Date: Sun Apr 19 07:20:33 UTC 2015 Modified Files: xsrc/external/mit/libX11/dist/include/X11 [netbsd-5]: Xlibint.h xsrc/xfree/xc/lib/X11 [netbsd-5]: Xlibint.h Log Message: Pull up following revision(s) (requested by mrg in ticket #1959): xsrc/external/mit/libX11/dist/include/X11/Xlibint.h patch xsrc/xfree/xc/lib/X11/Xlibint.h 1.2 Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h cvs rdiff -u -r1.1.1.7 -r1.1.1.7.8.1 xsrc/xfree/xc/lib/X11/Xlibint.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libX11/dist/include/X11/Xlibint.h diff -u xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.1.2.1 xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.1.2.2 --- xsrc/external/mit/libX11/dist/include/X11/Xlibint.h:1.1.1.1.2.1 Thu Sep 17 03:32:56 2009 +++ xsrc/external/mit/libX11/dist/include/X11/Xlibint.h Sun Apr 19 07:20:33 2015 @@ -530,6 +530,14 @@ extern LockInfoPtr _Xglobal_lock; #endif #ifdef WORD64 +/* + * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32 + * length, after req-length, before the data in the request. The new length + * includes the n extra 32-bit words. + * + * Do not use MakeBigReq if there is no data already in the request. + * req-length must already be = 2. + */ #define MakeBigReq(req,n) \ { \ char _BRdat[4]; \ @@ -548,7 +556,7 @@ extern LockInfoPtr _Xglobal_lock; CARD32 _BRlen = req-length - 1; \ req-length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ -memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen 2); \ +memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, _BRdat, 4); \ } @@ -559,13 +567,20 @@ extern LockInfoPtr _Xglobal_lock; CARD32 _BRlen = req-length - 1; \ req-length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ -memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen 2); \ +memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, _BRdat, 4); \ } #endif #endif +/* + * SetReqLen increases the count of 32-bit words in the request by n, + * or by badlen if n is too large. + * + * Do not use SetReqLen if req does not already have data after the + * xReq header. req-length must already be = 2. + */ #define SetReqLen(req,n,badlen) \ if ((req-length + n) (unsigned)65535) { \ if (dpy-bigreq_size) { \ Index: xsrc/xfree/xc/lib/X11/Xlibint.h diff -u xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7.8.1 --- xsrc/xfree/xc/lib/X11/Xlibint.h:1.1.1.7 Fri Mar 18 13:04:29 2005 +++ xsrc/xfree/xc/lib/X11/Xlibint.h Sun Apr 19 07:20:33 2015 @@ -528,6 +528,14 @@ extern LockInfoPtr _Xglobal_lock; #endif #ifdef WORD64 +/* + * MakeBigReq sets the CARD16 req-length to 0 and inserts a new CARD32 + * length, after req-length, before the data in the request. The new length + * includes the n extra 32-bit words. + * + * Do not use MakeBigReq if there is no data already in the request. + * req-length must already be = 2. + */ #define MakeBigReq(req,n) \ { \ char _BRdat[4]; \ @@ -546,7 +554,7 @@ extern LockInfoPtr _Xglobal_lock; CARD32 _BRlen = req-length - 1; \ req-length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ -memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen 2); \ +memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, _BRdat, 4); \ } @@ -557,13 +565,20 @@ extern LockInfoPtr _Xglobal_lock; CARD32 _BRlen = req-length - 1; \ req-length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ -memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen 2); \ +memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, _BRdat, 4); \ } #endif #endif +/* + * SetReqLen increases the count of 32-bit words in the request by n, + * or by badlen if n is too large. + * + * Do not use SetReqLen if req does not already have data after the + * xReq header. req-length must already be = 2. + */ #define SetReqLen(req,n,badlen) \ if ((req-length + n) (unsigned)65535) { \ if (dpy-bigreq_size) { \
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: snj Date: Tue Mar 17 18:42:34 UTC 2015 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-5]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-5]: bdfread.c Log Message: Apply patch (requested by mrg in ticket #1953): Fix the following security issues: CVE-2015-1802: bdfReadProperties: property count needs range check The bdf parser reads a count for the number of properties defined in a font from the font file, and allocates arrays with entries for each property based on that count. It never checked to see if that count was negative, or large enough to overflow when multiplied by the size of the structures being allocated, and could thus allocate the wrong buffer size, leading to out of bounds writes. CVE-2015-1803: bdfReadCharacters: bailout if a char's bitmap cannot be read If the bdf parser failed to parse the data for the bitmap for any character, it would proceed with an invalid pointer to the bitmap data and later crash when trying to read the bitmap from that pointer. CVE-2015-1804: bdfReadCharacters: ensure metrics fit into xCharInfo struct The bdf parser read metrics values as 32-bit integers, but stored them into 16-bit integers. Overflows could occur in various operations To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2.2.1 -r1.2.2.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.2 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.3 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.2 Tue Jan 7 18:07:17 2014 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Mar 17 18:42:34 2015 @@ -65,8 +65,16 @@ from The Open Group. #if HAVE_STDINT_H #include stdint.h -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@ bdfReadCharacters(FontFilePtr file, Font 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); @@ -430,6 +444,14 @@ bdfReadCharacters(FontFilePtr file, Font 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 ); @@ -461,7 +483,10 @@ bdfReadCharacters(FontFilePtr file, Font 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 @@ -607,7 +632,9 @@ bdfReadProperties(FontFilePtr file, Font 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); } Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.2 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.1 Tue Jan 7 18:07:17 2014 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Mar 17 18:42:34 2015 @@ -63,8 +63,16 @@ from The Open Group. #if HAVE_STDINT_H #include stdint.h -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -420,6 +428,12 @@
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: martin Date: Wed Feb 11 15:24:52 UTC 2015 Modified Files: xsrc/external/mit/xorg-server/dist/xkb [netbsd-5]: xkb.c xsrc/xfree/xc/programs/Xserver/xkb [netbsd-5]: xkb.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1949): external/mit/xorg-server/dist/xkb/xkb.c: revision 1.2 xfree/xc/programs/Xserver/xkb/xkb.c: revision 1.2 apply fixes for CVE-2015-0255: Information leak in the XkbSetGeometry request of X servers http://www.x.org/wiki/Development/Security/Advisory-2015-02-10/ ported to xorg-server 1.10 and xfree myself. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/xkb/xkb.c cvs rdiff -u -r1.1.1.6 -r1.1.1.6.20.1 \ xsrc/xfree/xc/programs/Xserver/xkb/xkb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/xkb/xkb.c diff -u xsrc/external/mit/xorg-server/dist/xkb/xkb.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/xkb/xkb.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/xkb/xkb.c:1.1.1.1.2.1 Thu Sep 17 03:35:48 2009 +++ xsrc/external/mit/xorg-server/dist/xkb/xkb.c Wed Feb 11 15:24:52 2015 @@ -4820,27 +4820,30 @@ ProcXkbGetGeometry(ClientPtr client) /******/ -static char * -_GetCountedString(char **wire_inout,Bool swap) +static Status +_GetCountedString(char **wire_inout, ClientPtr client, char **str) { -char * wire,*str; -CARD16 len,*plen; +char *wire, *next; +CARD16 len; -wire= *wire_inout; -plen= (CARD16 *)wire; -if (swap) { - register int n; - swaps(plen,n); -} -len= *plen; -str= (char *)_XkbAlloc(len+1); -if (str) { - memcpy(str,wire[2],len); - str[len]= '\0'; +wire = *wire_inout; +len = *(CARD16 *) wire; +if (client-swapped) { + int n; +swaps(len, n); } -wire+= XkbPaddedSize(len+2); -*wire_inout= wire; -return str; +next = wire + XkbPaddedSize(len + 2); +/* Check we're still within the size of the request */ +if (client-req_len +bytes_to_int32(next - (char *) client-requestBuffer)) +return BadValue; +*str = malloc(len + 1); +if (!*str) +return BadAlloc; +memcpy(*str, wire[2], len); +*(*str + len) = '\0'; +*wire_inout = next; +return Success; } static Status @@ -4852,6 +4855,7 @@ _CheckSetDoodad( char ** wire_inout, char * wire; xkbDoodadWireDesc * dWire; XkbDoodadPtr doodad; +Status status; dWire= (xkbDoodadWireDesc *)(*wire_inout); wire= (char *)dWire[1]; @@ -4901,8 +4905,14 @@ XkbDoodadPtr doodad; doodad-text.width= dWire-text.width; doodad-text.height= dWire-text.height; doodad-text.color_ndx= dWire-text.colorNdx; - doodad-text.text= _GetCountedString(wire,client-swapped); - doodad-text.font= _GetCountedString(wire,client-swapped); +status = _GetCountedString(wire, client, doodad-text.text); +if (status != Success) +return status; +status = _GetCountedString(wire, client, doodad-text.font); +if (status != Success) { +free (doodad-text.text); +return status; +} break; case XkbIndicatorDoodad: if (dWire-indicator.onColorNdx=geom-num_colors) { @@ -4937,7 +4947,9 @@ XkbDoodadPtr doodad; } doodad-logo.color_ndx= dWire-logo.colorNdx; doodad-logo.shape_ndx= dWire-logo.shapeNdx; - doodad-logo.logo_name= _GetCountedString(wire,client-swapped); +status = _GetCountedString(wire, client, doodad-logo.logo_name); +if (status != Success) +return status; break; default: client-errorValue= _XkbErrCode2(0x4F,dWire-any.type); @@ -5172,17 +5184,19 @@ Status status; char * wire; wire= (char *)req[1]; -geom-label_font= _GetCountedString(wire,client-swapped); +status = _GetCountedString(wire, client, geom-label_font); +if (status != Success) +return status; -for (i=0;ireq-nProperties;i++) { - char *name,*val; - name= _GetCountedString(wire,client-swapped); -if (!name) -return BadAlloc; - val= _GetCountedString(wire,client-swapped); -if (!val) { +for (i = 0; i req-nProperties; i++) { + char *name, *val; +status = _GetCountedString(wire, client, name); +if (status != Success) +return status; +status = _GetCountedString(wire, client, val); +if (status != Success) { xfree(name); -return BadAlloc; +return status; } if (XkbAddGeomProperty(geom,name,val)==NULL) { xfree(name); @@ -5211,11 +5225,11 @@ char * wire; return BadMatch; } -for (i=0;ireq-nColors;i++) { +for (i = 0; i
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: msaitoh Date: Mon Dec 22 12:48:25 UTC 2014 Modified Files: xsrc/external/mit/xorg-server/dist/exa [netbsd-5]: exa_render.c xsrc/external/mit/xorg-server/dist/render [netbsd-5]: picture.h Log Message: Pullup additional patches requested by mrg in ticket #1935: xsrc/external/mit/xorg-server/dist/exa/exa_render.c 1.2 xsrc/external/mit/xorg-server/dist/render/picture.h 1.2 fixes for CVE CVE-2013-6424: If t-bottom is close to MIN_INT, removing top can wraparound, so do the check properly. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/exa/exa_render.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/render/picture.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/exa/exa_render.c diff -u xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.1 Thu Sep 17 03:34:54 2009 +++ xsrc/external/mit/xorg-server/dist/exa/exa_render.c Mon Dec 22 12:48:25 2014 @@ -1074,6 +1074,7 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc exaPrepareAccess(pPicture-pDrawable, EXA_PREPARE_DEST); for (; ntrap; ntrap--, traps++) + if (xTrapezoidValid(traps)) (*ps-RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); exaFinishAccess(pPicture-pDrawable, EXA_PREPARE_DEST); Index: xsrc/external/mit/xorg-server/dist/render/picture.h diff -u xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.1 Thu Sep 17 03:35:47 2009 +++ xsrc/external/mit/xorg-server/dist/render/picture.h Mon Dec 22 12:48:25 2014 @@ -201,7 +201,7 @@ typedef pixman_fixed_t xFixed; /* whether 't' is a well defined not obviously empty trapezoid */ #define xTrapezoidValid(t) ((t)-left.p1.y != (t)-left.p2.y \ (t)-right.p1.y != (t)-right.p2.y \ - (int) ((t)-bottom - (t)-top) 0) + ((t)-bottom (t)-top)) /* * Standard NTSC luminance conversions:
CVS commit: [netbsd-5] xsrc/xfree/xc/programs/Xserver
Module Name:xsrc Committed By: snj Date: Mon Dec 15 07:02:47 UTC 2014 Modified Files: xsrc/xfree/xc/programs/Xserver/GL/glx [netbsd-5]: single2.c single2swap.c singlepix.c singlepixswap.c xsrc/xfree/xc/programs/Xserver/Xext [netbsd-5]: EVI.c xf86vmode.c Log Message: Apply patch (requested by mrg in ticket 1935): Fix build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.6.8.1 -r1.1.1.6.8.2 \ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c \ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c cvs rdiff -u -r1.1.1.3.22.1 -r1.1.1.3.22.2 \ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c cvs rdiff -u -r1.1.1.4.22.1 -r1.1.1.4.22.2 \ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.20.1 \ xsrc/xfree/xc/programs/Xserver/Xext/EVI.c cvs rdiff -u -r1.1.1.6 -r1.1.1.6.20.1 \ xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.2 --- xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c:1.1.1.6.8.1 Fri Dec 12 06:54:25 2014 +++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c Mon Dec 15 07:02:47 2014 @@ -42,6 +42,8 @@ #include g_disptab.h #include GL/glx_ansic.h +#include stdint.h + int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl-client; Index: xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.1 xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.2 --- xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c:1.1.1.6.8.1 Fri Dec 12 06:54:25 2014 +++ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c Mon Dec 15 07:02:47 2014 @@ -42,6 +42,8 @@ #include g_disptab.h #include GL/glx_ansic.h +#include stdint.h + int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl-client; Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.2 --- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c:1.1.1.3.22.1 Fri Dec 12 06:54:25 2014 +++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c Mon Dec 15 07:02:47 2014 @@ -42,6 +42,8 @@ #include g_disptab.h #include g_disptab_EXT.h +#include stdint.h + int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) { GLsizei width, height; Index: xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c diff -u xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.1 xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.2 --- xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c:1.1.1.4.22.1 Fri Dec 12 06:54:25 2014 +++ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c Mon Dec 15 07:02:47 2014 @@ -42,6 +42,8 @@ #include g_disptab.h #include g_disptab_EXT.h +#include stdint.h + int __glXDispSwap_ReadPixels(__GLXclientState *cl, GLbyte *pc) { GLsizei width, height; Index: xsrc/xfree/xc/programs/Xserver/Xext/EVI.c diff -u xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4 xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4.20.1 --- xsrc/xfree/xc/programs/Xserver/Xext/EVI.c:1.1.1.4 Fri Mar 5 14:27:38 2004 +++ xsrc/xfree/xc/programs/Xserver/Xext/EVI.c Mon Dec 15 07:02:47 2014 @@ -33,6 +33,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include EVIstruct.h #include modinit.h +#include stdint.h + #if 0 static unsigned char XEVIReqCode = 0; #endif Index: xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c diff -u xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6 xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6.20.1 --- xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c:1.1.1.6 Fri Mar 5 14:27:40 2004 +++ xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c Mon Dec 15 07:02:47 2014 @@ -51,6 +51,8 @@ from Kaleb S. KEITHLEY #include xf86_ansic.h #endif +#include stdint.h + static int VidModeErrorBase; static int VidModeGeneration = 0; static int VidModeClientPrivateIndex;
CVS commit: [netbsd-5] xsrc/xfree/xc/programs/Xserver
Module Name:xsrc Committed By: snj Date: Fri Dec 12 06:54:25 UTC 2014 Modified Files: xsrc/xfree/xc/programs/Xserver/GL/glx [netbsd-5]: glxcmds.c glxcmdsswap.c glxserver.h rensize.c single2.c single2swap.c singlepix.c singlepixswap.c unpack.h xsrc/xfree/xc/programs/Xserver/Xext [netbsd-5]: xcmisc.c xvdisp.c xsrc/xfree/xc/programs/Xserver/Xi [netbsd-5]: chgdctl.c chgfctl.c sendexev.c xsrc/xfree/xc/programs/Xserver/dbe [netbsd-5]: dbe.c xsrc/xfree/xc/programs/Xserver/dix [netbsd-5]: dispatch.c xsrc/xfree/xc/programs/Xserver/include [netbsd-5]: dix.h misc.h xsrc/xfree/xc/programs/Xserver/os [netbsd-5]: access.c rpcauth.c xsrc/xfree/xc/programs/Xserver/randr [netbsd-5]: randr.c xsrc/xfree/xc/programs/Xserver/render [netbsd-5]: render.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1935): xfree/xc/programs/Xserver/dix/dispatch.c: revision 1.2 xfree/xc/programs/Xserver/Xext/xvdisp.c: revision 1.2 xfree/xc/programs/Xserver/include/misc.h: revision 1.2 xfree/xc/programs/Xserver/render/render.c: revision 1.4 xfree/xc/programs/Xserver/GL/glx/singlepixswap.c: revision 1.2 xfree/xc/programs/Xserver/Xi/sendexev.c: revision 1.2 xfree/xc/programs/Xserver/include/dix.h: revision 1.2 xfree/xc/programs/Xserver/os/access.c: revision 1.7 xfree/xc/programs/Xserver/GL/glx/glxserver.h: revision 1.2 xfree/xc/programs/Xserver/GL/glx/rensize.c: revision 1.2 xfree/xc/programs/Xserver/GL/glx/unpack.h: revision 1.2 xfree/xc/programs/Xserver/GL/glx/singlepix.c: revision 1.2 xfree/xc/programs/Xserver/Xi/chgfctl.c: revision 1.2 xfree/xc/programs/Xserver/Xi/chgdctl.c: revision 1.2 xfree/xc/programs/Xserver/GL/glx/glxcmds.c: revision 1.2 xfree/xc/programs/Xserver/Xext/xcmisc.c: revision 1.3 xfree/xc/programs/Xserver/randr/randr.c: revision 1.2 xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c: revision 1.2 xfree/xc/programs/Xserver/os/rpcauth.c: revision 1.2 xfree/xc/programs/Xserver/dbe/dbe.c: revision 1.3 xfree/xc/programs/Xserver/GL/glx/single2.c: revision 1.2 xfree/xc/programs/Xserver/GL/glx/single2swap.c: revision 1.2 pull over from xorg-server, porting as necessary. - -- apply fixes for: X.Org Security Advisory: Dec. 9, 2014 Protocol handling issues in X Window System servers backported to 1.10.x by myself. included are fixes for: denial of service due to unchecked malloc in client authentication CVE-2014-8091 integer overflows calculating memory needs for requests CVE-2014-8092 CVE-2014-8093 CVE-2014-8094 out of bounds access due to not validating length or offset values in requests CVE-2014-8095 CVE-2014-8096 CVE-2014-8097 CVE-2014-8098 CVE-2014-8099 CVE-2014-8100 CVE-2014-8101 CVE-2014-8102 CVE-2014-8103 - -- apply two more parts of CVE-2014-8092: Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5] dix: GetHosts bounds check using wrong pointer value [CVE-2014-8092 pt. 6] - -- To generate a diff of this commit: cvs rdiff -u -r1.1.1.6 -r1.1.1.6.8.1 \ xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmds.c \ xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c \ xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h \ xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c \ xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c \ xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h cvs rdiff -u -r1.1.1.7 -r1.1.1.7.8.1 \ xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.22.1 \ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.22.1 \ xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c cvs rdiff -u -r1.1.1.5 -r1.1.1.5.20.1 \ xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.22.1 \ xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c \ xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c \ xsrc/xfree/xc/programs/Xserver/Xi/sendexev.c cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/xfree/xc/programs/Xserver/dbe/dbe.c cvs rdiff -u -r1.1.1.7 -r1.1.1.7.8.1 \ xsrc/xfree/xc/programs/Xserver/dix/dispatch.c cvs rdiff -u -r1.1.1.6 -r1.1.1.6.20.1 \ xsrc/xfree/xc/programs/Xserver/include/dix.h cvs rdiff -u -r1.1.1.6 -r1.1.1.6.8.1 \ xsrc/xfree/xc/programs/Xserver/include/misc.h cvs rdiff -u -r1.6 -r1.6.8.1 xsrc/xfree/xc/programs/Xserver/os/access.c cvs rdiff -u -r1.1.1.5 -r1.1.1.5.20.1 \ xsrc/xfree/xc/programs/Xserver/os/rpcauth.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.20.1 \ xsrc/xfree/xc/programs/Xserver/randr/randr.c cvs rdiff -u -r1.3 -r1.3.2.1 xsrc/xfree/xc/programs/Xserver/render/render.c Please note that diffs are not public
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: snj Date: Wed Dec 10 22:58:41 UTC 2014 Modified Files: xsrc/external/mit/xorg-server/dist/include [netbsd-5]: dix.h xsrc/external/mit/xorg-server/dist/os [netbsd-5]: access.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1935): external/mit/xorg-server/dist/include/dix.h: revision 1.3 external/mit/xorg-server/dist/os/access.c: revision 1.3 via patch apply two more parts of CVE-2014-8092: Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5] dix: GetHosts bounds check using wrong pointer value [CVE-2014-8092 pt. 6] To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xorg-server/dist/include/dix.h cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xorg-server/dist/os/access.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/include/dix.h diff -u xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.3 --- xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.2 Tue Dec 9 19:55:10 2014 +++ xsrc/external/mit/xorg-server/dist/include/dix.h Wed Dec 10 22:58:41 2014 @@ -78,7 +78,7 @@ SOFTWARE. #define REQUEST_FIXED_SIZE(req, n)\ if (((sizeof(req) 2) client-req_len) || \ -((n 2) = client-req_len) || \ +(((n) 2) = client-req_len) || \ uint64_t) sizeof(req) + (n) + 3) 2) != (uint64_t) client-req_len)) \ return(BadLength) Index: xsrc/external/mit/xorg-server/dist/os/access.c diff -u xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.3 --- xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.2 Tue Dec 9 19:55:10 2014 +++ xsrc/external/mit/xorg-server/dist/os/access.c Wed Dec 10 22:58:41 2014 @@ -1474,7 +1474,7 @@ GetHosts ( for (host = validhosts; host; host = host-next) { len = host-len; -if ((ptr + sizeof(xHostEntry) + len) ((unsigned char *)data + n)) +if ((ptr + sizeof(xHostEntry) + len) ((unsigned char *) *data + n)) break; ((xHostEntry *)ptr)-family = host-family; ((xHostEntry *)ptr)-length = len;
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: snj Date: Tue Dec 9 19:55:11 UTC 2014 Modified Files: xsrc/external/mit/xorg-server/dist/Xext [netbsd-5]: xcmisc.c xvdisp.c xsrc/external/mit/xorg-server/dist/Xi [netbsd-5]: chgdctl.c chgfctl.c sendexev.c xiproperty.c xsrc/external/mit/xorg-server/dist/dbe [netbsd-5]: dbe.c xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: dispatch.c xsrc/external/mit/xorg-server/dist/glx [netbsd-5]: glxcmds.c glxcmdsswap.c glxserver.h indirect_program.c indirect_reqsize.c indirect_reqsize.h indirect_texture_compression.c indirect_util.c rensize.c single2.c single2swap.c singlepix.c singlepixswap.c swap_interval.c unpack.h xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2 [netbsd-5]: dri2ext.c xsrc/external/mit/xorg-server/dist/include [netbsd-5]: dix.h misc.h xsrc/external/mit/xorg-server/dist/os [netbsd-5]: access.c rpcauth.c xsrc/external/mit/xorg-server/dist/randr [netbsd-5]: rrsdispatch.c xsrc/external/mit/xorg-server/dist/render [netbsd-5]: render.c xsrc/external/mit/xorg-server/dist/xfixes [netbsd-5]: select.c Log Message: Apply patch (requested by mrg in ticket #1935): apply fixes for X.Org Security Advisory: Dec. 9, 2014 Protocol handling issues in X Window System servers included are fixes for: denial of service due to unchecked malloc in client authentication CVE-2014-8091 integer overflows calculating memory needs for requests CVE-2014-8092 CVE-2014-8093 CVE-2014-8094 out of bounds access due to not validating length or offset values in requests CVE-2014-8095 CVE-2014-8096 CVE-2014-8097 CVE-2014-8098 CVE-2014-8099 CVE-2014-8100 CVE-2014-8101 CVE-2014-8102 CVE-2014-8103 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c \ xsrc/external/mit/xorg-server/dist/Xext/xvdisp.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/Xi/chgdctl.c \ xsrc/external/mit/xorg-server/dist/Xi/chgfctl.c \ xsrc/external/mit/xorg-server/dist/Xi/sendexev.c cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \ xsrc/external/mit/xorg-server/dist/Xi/xiproperty.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/dbe/dbe.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/dix/dispatch.c cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \ xsrc/external/mit/xorg-server/dist/glx/glxcmds.c cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xorg-server/dist/glx/glxcmdsswap.c \ xsrc/external/mit/xorg-server/dist/glx/glxserver.h \ xsrc/external/mit/xorg-server/dist/glx/indirect_program.c \ xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.c \ xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.h \ xsrc/external/mit/xorg-server/dist/glx/indirect_texture_compression.c \ xsrc/external/mit/xorg-server/dist/glx/indirect_util.c \ xsrc/external/mit/xorg-server/dist/glx/rensize.c \ xsrc/external/mit/xorg-server/dist/glx/single2.c \ xsrc/external/mit/xorg-server/dist/glx/single2swap.c \ xsrc/external/mit/xorg-server/dist/glx/singlepix.c \ xsrc/external/mit/xorg-server/dist/glx/singlepixswap.c \ xsrc/external/mit/xorg-server/dist/glx/swap_interval.c \ xsrc/external/mit/xorg-server/dist/glx/unpack.h cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2ext.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/include/dix.h \ xsrc/external/mit/xorg-server/dist/include/misc.h cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/os/access.c \ xsrc/external/mit/xorg-server/dist/os/rpcauth.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/render/render.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/xfixes/select.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c diff -u xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.1 Thu Sep 17 03:34:49 2009 +++ xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c Tue Dec 9 19:55:10 2014 @@ -200,6 +200,7 @@ SProcXCMiscGetXIDList(client) { int n; REQUEST(xXCMiscGetXIDListReq); +REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); swaps(stuff-length, n); swapl(stuff-count, n); Index:
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: msaitoh Date: Wed May 14 05:24:26 UTC 2014 Modified Files: xsrc/external/mit/libXfont/dist/src/fc [netbsd-5]: fsconvert.c fserve.c xsrc/external/mit/libXfont/dist/src/fontfile [netbsd-5]: dirfile.c xsrc/xfree/xc/lib/font/fc [netbsd-5]: fsconvert.c fserve.c xsrc/xfree/xc/lib/font/fontfile [netbsd-5]: dirfile.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1905): src/sys/compat/linux/common/linux_exec_elf32.c 1.91 via patch A specially-crafted binary could easily control a kernel array index. Add some checks to ensure that nothing will be read outside the allocated area. Rewrite the code so that we don't need to allocate the whole section. Spotted by several developers, patch from chs@/enami@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c \ xsrc/external/mit/libXfont/dist/src/fc/fserve.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/libXfont/dist/src/fontfile/dirfile.c cvs rdiff -u -r1.4 -r1.4.20.1 xsrc/xfree/xc/lib/font/fc/fsconvert.c \ xsrc/xfree/xc/lib/font/fc/fserve.c cvs rdiff -u -r1.4 -r1.4.8.1 xsrc/xfree/xc/lib/font/fontfile/dirfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c diff -u xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c:1.1.1.1.2.1 xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c:1.1.1.1.2.2 --- xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c:1.1.1.1.2.1 Thu Sep 17 03:33:15 2009 +++ xsrc/external/mit/libXfont/dist/src/fc/fsconvert.c Wed May 14 05:24:26 2014 @@ -120,6 +120,10 @@ _fs_convert_props(fsPropInfo *pi, fsProp for (i = 0; i nprops; i++, dprop++, is_str++) { memcpy(local_off, off_adr, SIZEOF(fsPropOffset)); + if ((local_off.name.position = pi-data_len) || + (local_off.name.length + (pi-data_len - local_off.name.position))) + goto bail; dprop-name = MakeAtom(pdc[local_off.name.position], local_off.name.length, 1); if (local_off.type != PropTypeString) { @@ -127,10 +131,15 @@ _fs_convert_props(fsPropInfo *pi, fsProp dprop-value = local_off.value.position; } else { *is_str = TRUE; + if ((local_off.name.position = pi-data_len) || + (local_off.name.length + (pi-data_len - local_off.name.position))) + goto bail; dprop-value = (INT32) MakeAtom(pdc[local_off.value.position], local_off.value.length, 1); if (dprop-value == BAD_RESOURCE) { + bail: free (pfi-props); pfi-nprops = 0; pfi-props = 0; @@ -714,7 +723,12 @@ fs_alloc_glyphs (FontPtr pFont, int size FSGlyphPtr glyphs; FSFontPtr fsfont = (FSFontPtr) pFont-fontPrivate; -glyphs = malloc (sizeof (FSGlyphRec) + size); +if (size (INT_MAX - sizeof (FSGlyphRec))) + glyphs = malloc (sizeof (FSGlyphRec) + size); +else +glyphs = NULL; +if (glyphs == NULL) +return NULL; glyphs-next = fsfont-glyphs; fsfont-glyphs = glyphs; return (pointer) (glyphs + 1); Index: xsrc/external/mit/libXfont/dist/src/fc/fserve.c diff -u xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.1.1.1.2.1 xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.1.1.1.2.2 --- xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.1.1.1.2.1 Thu Sep 17 03:33:15 2009 +++ xsrc/external/mit/libXfont/dist/src/fc/fserve.c Wed May 14 05:24:26 2014 @@ -73,6 +73,7 @@ in this Software without prior written a #include fservestr.h #include X11/fonts/fontutil.h #include errno.h +#includelimits.h #include time.h #define Time_t time_t @@ -94,6 +95,15 @@ in this Software without prior written a (pci)-descent || \ (pci)-characterWidth) +/* + * SIZEOF(r) is in bytes, length fields in the protocol are in 32-bit words, + * so this converts for doing size comparisons. + */ +#define LENGTHOF(r)(SIZEOF(r) 2) + +/* Somewhat arbitrary limit on maximum reply size we'll try to read. */ +#define MAX_REPLY_LENGTH ((64 * 1024 * 1024) 2) + extern void ErrorF(const char *f, ...); static int fs_read_glyphs ( FontPathElementPtr fpe, FSBlockDataPtr blockrec ); @@ -209,9 +219,22 @@ _fs_add_rep_log (FSFpePtr conn, fsGeneri rep-sequenceNumber, conn-reqbuffer[i].opcode); } + +#define _fs_reply_failed(rep, name, op) do {\ +if (rep) { \ +if (rep-type == FS_Error) \ +fprintf (stderr, Error: %d Request: %s\n, \ + ((fsError *)rep)-request, #name); \ +else\ +fprintf (stderr, Bad Length for %s Reply: %d %s %d\n, \ + #name, rep-length,
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: bouyer Date: Tue Jan 7 18:07:17 UTC 2014 Modified Files: xsrc/external/mit/libXfont/dist/src/bitmap [netbsd-5]: bdfread.c xsrc/xfree/xc/lib/font/bitmap [netbsd-5]: bdfread.c Log Message: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.cpatch xsrc/xfree/xc/lib/font/bitmap/bdfread.c patch Fix CVE-2013-6462: scanf without field width limits can crash with huge input data. [wiz, ticket #1896] To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/xfree/xc/lib/font/bitmap/bdfread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.2 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.1.1.1.2.1 Thu Sep 17 03:33:14 2009 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Tue Jan 7 18:07:17 2014 @@ -72,6 +72,7 @@ from The Open Group. #define INDICES 256 #define MAXENCODING 0x #define BDFLINELEN 1024 +#define BDFLINESTR %1023s /* scanf specifier to read a BDFLINELEN string */ static Bool bdfPadToTerminal(FontPtr pFont); extern int bdfFileLineNum; @@ -341,7 +342,7 @@ bdfReadCharacters(FontFilePtr file, Font charcharName[100]; int ignore; - if (sscanf((char *) line, STARTCHAR %s, charName) != 1) { + if (sscanf((char *) line, STARTCHAR %99s, charName) != 1) { bdfError(bad character name in BDF file\n); goto BAILOUT; /* bottom of function, free and return error */ } @@ -547,13 +548,18 @@ bdfReadHeader(FontFilePtr file, bdfFileS unsigned charlineBuf[BDFLINELEN]; line = bdfGetLine(file, lineBuf, BDFLINELEN); -if (!line || sscanf((char *) line, STARTFONT %s, namebuf) != 1 || +if (!line || + sscanf((char *) line, STARTFONT BDFLINESTR, namebuf) != 1 || !bdfStrEqual(namebuf, 2.1)) { bdfError(bad 'STARTFONT'\n); return (FALSE); } line = bdfGetLine(file, lineBuf, BDFLINELEN); -if (!line || sscanf((char *) line, FONT %[^\n], pState-fontName) != 1) { +#if MAXFONTNAMELEN != 1024 +# error need to adjust sscanf length limit to be MAXFONTNAMELEN - 1 +#endif +if (!line || + sscanf((char *) line, FONT %1023[^\n], pState-fontName) != 1) { bdfError(bad 'FONT'\n); return (FALSE); } @@ -636,7 +642,9 @@ bdfReadProperties(FontFilePtr file, Font while (*line isspace(*line)) line++; - switch (sscanf((char *) line, %s%s%s, namebuf, secondbuf, thirdbuf)) { + switch (sscanf((char *) line, + BDFLINESTR BDFLINESTR BDFLINESTR, + namebuf, secondbuf, thirdbuf)) { default: bdfError(missing '%s' parameter value\n, namebuf); goto BAILOUT; Index: xsrc/xfree/xc/lib/font/bitmap/bdfread.c diff -u xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2 xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2.2.1 --- xsrc/xfree/xc/lib/font/bitmap/bdfread.c:1.2 Tue Apr 3 20:10:34 2007 +++ xsrc/xfree/xc/lib/font/bitmap/bdfread.c Tue Jan 7 18:07:17 2014 @@ -70,6 +70,7 @@ from The Open Group. #define INDICES 256 #define MAXENCODING 0x #define BDFLINELEN 1024 +#define BDFLINESTR %1023s /* scanf specifier to read a BDFLINELEN string */ static Bool bdfPadToTerminal(FontPtr pFont); extern int bdfFileLineNum; @@ -340,7 +341,7 @@ bdfReadCharacters(FontFilePtr file, Font charcharName[100]; int ignore; - if (sscanf((char *) line, STARTCHAR %s, charName) != 1) { + if (sscanf((char *) line, STARTCHAR %99s, charName) != 1) { bdfError(bad character name in BDF file\n); goto BAILOUT; /* bottom of function, free and return error */ } @@ -549,13 +550,18 @@ bdfReadHeader(FontFilePtr file, bdfFileS unsigned charlineBuf[BDFLINELEN]; line = bdfGetLine(file, lineBuf, BDFLINELEN); -if (!line || sscanf((char *) line, STARTFONT %s, namebuf) != 1 || +if (!line || + sscanf((char *) line, STARTFONT BDFLINESTR, namebuf) != 1 || !bdfStrEqual(namebuf, 2.1)) { bdfError(bad 'STARTFONT'\n); return (FALSE); } line = bdfGetLine(file, lineBuf, BDFLINELEN); -if (!line || sscanf((char *) line, FONT %[^\n], pState-fontName) != 1) { +#if MAXFONTNAMELEN != 1024 +# error need to adjust sscanf length limit to be MAXFONTNAMELEN - 1 +#endif +if (!line || + sscanf((char *) line, FONT %1023[^\n], pState-fontName) != 1) { bdfError(bad 'FONT'\n); return (FALSE); } @@ -639,7 +645,9 @@ bdfReadProperties(FontFilePtr file, Font while (*line isspace(*line)) line++; - switch (sscanf((char *) line, %s%s%s, namebuf, secondbuf, thirdbuf)) { + switch (sscanf((char *) line, + BDFLINESTR BDFLINESTR BDFLINESTR, + namebuf, secondbuf, thirdbuf)) { default:
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: jdc Date: Sun Oct 13 07:24:36 UTC 2013 Modified Files: xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: dixfonts.c xsrc/xfree/xc/programs/Xserver/dix [netbsd-5]: dixfonts.c Log Message: Pull up revisions: xsrc/external/mit/xorg-server/dist/dix/dixfonts.c revision 1.2 via patch xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c revision 1.4 via patch (requested by spz in ticket #1884). Fix CVE-2013-4396 using a patch from: --- snip --- From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith alan.coopersm...@oracle.com Date: Mon, 16 Sep 2013 21:47:16 -0700 Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText() Save a pointer to the passed in closure structure before copying it and overwriting the *c pointer to point to our copy instead of the original. If we hit an error, once we free(c), reset c to point to the original structure before jumping to the cleanup code that references *c. Since one of the errors being checked for is whether the server was able to malloc(c-nChars * itemSize), the client can potentially pass a number of characters chosen to cause the malloc to fail and the error path to be taken, resulting in the read from freed memory. Since the memory is accessed almost immediately afterwards, and the X server is mostly single threaded, the odds of the free memory having invalid contents are low with most malloc implementations when not using memory debugging features, but some allocators will definitely overwrite the memory there, leading to a likely crash. Reported-by: Pedro Ribeiro ped...@gmail.com Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com Reviewed-by: Julien Cristau jcris...@debian.org To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/dix/dixfonts.c cvs rdiff -u -r1.2 -r1.2.8.1 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/dix/dixfonts.c diff -u xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/dix/dixfonts.c:1.1.1.1.2.1 Thu Sep 17 03:34:53 2009 +++ xsrc/external/mit/xorg-server/dist/dix/dixfonts.c Sun Oct 13 07:24:36 2013 @@ -1512,6 +1512,7 @@ doImageText(ClientPtr client, ITclosureP GC *pGC; unsigned char *data; ITclosurePtr new_closure; +ITclosurePtr old_closure; /* We're putting the client to sleep. We need to save some state. Similar problem to that handled @@ -1524,6 +1525,7 @@ doImageText(ClientPtr client, ITclosureP err = BadAlloc; goto bail; } + old_closure = c; *new_closure = *c; c = new_closure; @@ -1531,6 +1533,7 @@ doImageText(ClientPtr client, ITclosureP if (!data) { xfree(c); + c = old_closure; err = BadAlloc; goto bail; } @@ -1542,6 +1545,7 @@ doImageText(ClientPtr client, ITclosureP { xfree(c-data); xfree(c); + c = old_closure; err = BadAlloc; goto bail; } @@ -1555,6 +1559,7 @@ doImageText(ClientPtr client, ITclosureP FreeScratchGC(pGC); xfree(c-data); xfree(c); + c = old_closure; err = BadAlloc; goto bail; } Index: xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c diff -u xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2 xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2.8.1 --- xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c:1.2 Sun Jul 2 19:17:56 2006 +++ xsrc/xfree/xc/programs/Xserver/dix/dixfonts.c Sun Oct 13 07:24:36 2013 @@ -1544,6 +1544,7 @@ doImageText(client, c) GC *pGC; unsigned char *data; ITclosurePtr new_closure; + ITclosurePtr old_closure; /* We're putting the client to sleep. We need to save some state. Similar problem to that handled @@ -1556,6 +1557,7 @@ doImageText(client, c) err = BadAlloc; goto bail; } + old_closure = c; *new_closure = *c; c = new_closure; @@ -1563,6 +1565,7 @@ doImageText(client, c) if (!data) { xfree(c); + c = old_closure; err = BadAlloc; goto bail; } @@ -1574,6 +1577,7 @@ doImageText(client, c) { xfree(c-data); xfree(c); + c = old_closure; err = BadAlloc; goto bail; } @@ -1587,6 +1591,7 @@ doImageText(client, c) FreeScratchGC(pGC); xfree(c-data); xfree(c); + c = old_closure; err = BadAlloc; goto bail; }
CVS commit: [netbsd-5] xsrc/external/mit/expat/dist
Module Name:xsrc Committed By: riz Date: Mon Nov 26 20:00:19 UTC 2012 Modified Files: xsrc/external/mit/expat/dist/lib [netbsd-5]: expat.h xmlparse.c xsrc/external/mit/expat/dist/xmlwf [netbsd-5]: readfilemap.c Log Message: xsrc/external/mit/expat/dist/lib/expat.hpatch xsrc/external/mit/expat/dist/lib/xmlparse.c patch xsrc/external/mit/expat/dist/xmlwf/readfilemap.cpatch Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876. [spz, ticket #1821] To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/expat.h cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/expat/dist/lib/xmlparse.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/expat/dist/xmlwf/readfilemap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/expat/dist/lib/expat.h diff -u xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1.2.1 --- xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 Tue Jul 29 05:35:06 2008 +++ xsrc/external/mit/expat/dist/lib/expat.h Mon Nov 26 20:00:18 2012 @@ -883,6 +883,15 @@ XMLPARSEAPI(int) XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing parsing); +/* Sets the hash salt to use for internal hash calculations. + Helps in preventing DoS attacks based on predicting hash + function behavior. This must be called before parsing is started. + Returns 1 if successful, 0 when called after parsing has started. +*/ +XMLPARSEAPI(int) +XML_SetHashSalt(XML_Parser parser, +unsigned long hash_salt); + /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then XML_GetErrorCode returns information about the error. */ Index: xsrc/external/mit/expat/dist/lib/xmlparse.c diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.2 --- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 Wed Jan 27 20:43:00 2010 +++ xsrc/external/mit/expat/dist/lib/xmlparse.c Mon Nov 26 20:00:19 2012 @@ -5,6 +5,8 @@ #include stddef.h #include string.h /* memset(), memcpy() */ #include assert.h +#include limits.h /* UINT_MAX */ +#include time.h /* time() */ #define XML_BUILDING_EXPAT 1 @@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M static void dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms); static int -dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms); +dtdCopy(XML_Parser oldParser, +DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms); static int -copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *); - +copyEntityTable(XML_Parser oldParser, +HASH_TABLE *, STRING_POOL *, const HASH_TABLE *); static NAMED * -lookup(HASH_TABLE *table, KEY name, size_t createSize); +lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize); static void FASTCALL hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms); static void FASTCALL hashTableClear(HASH_TABLE *); @@ -429,11 +432,15 @@ static ELEMENT_TYPE * getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, const char *end); +static unsigned long generate_hash_secret_salt(void); +static XML_Bool startParsing(XML_Parser parser); + static XML_Parser parserCreate(const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep, DTD *dtd); + static void parserInit(XML_Parser parser, const XML_Char *encodingName); @@ -546,6 +553,7 @@ struct XML_ParserStruct { XML_Bool m_useForeignDTD; enum XML_ParamEntityParsing m_paramEntityParsing; #endif + unsigned long m_hash_secret_salt; }; #define MALLOC(s) (parser-m_mem.malloc_fcn((s))) @@ -653,6 +661,7 @@ struct XML_ParserStruct { #define useForeignDTD (parser-m_useForeignDTD) #define paramEntityParsing (parser-m_paramEntityParsing) #endif /* XML_DTD */ +#define hash_secret_salt (parser-m_hash_secret_salt) XML_Parser XMLCALL XML_ParserCreate(const XML_Char *encodingName) @@ -677,22 +686,35 @@ static const XML_Char implicitContext[] ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' }; +static unsigned long +generate_hash_secret_salt(void) +{ + unsigned int seed = time(NULL) % UINT_MAX; + srand(seed); + return rand(); +} + +static XML_Bool /* only valid for root parser */ +startParsing(XML_Parser parser) +{ +/* hash functions must be initialized before setContext() is called */ +if (hash_secret_salt == 0) + hash_secret_salt = generate_hash_secret_salt(); +if (ns) { + /* implicit context only set for root parser, since child +
CVS commit: [netbsd-5] xsrc/xfree/xc/programs/Xserver
Module Name:xsrc Committed By: snj Date: Mon Jan 2 23:47:56 UTC 2012 Modified Files: xsrc/xfree/xc/programs/Xserver/fb [netbsd-5]: fbpict.c xsrc/xfree/xc/programs/Xserver/mi [netbsd-5]: miarc.c misprite.c Log Message: Pull up following revision(s) (requested by is in ticket #1707): xfree/xc/programs/Xserver/mi/misprite.c: revision 1.2 xfree/xc/programs/Xserver/mi/miarc.c: revision 1.2 xfree/xc/programs/Xserver/fb/fbpict.c: revision 1.5 This fix is taken from xorg-server 1.9.2. mod(a,b) used to be defined with a - in front of naked a, such that uses of mod with certain arithmetic expressions as a led to surprising results, namely the one in Xrender praised in CVE-2010-1166. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.2.1 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c cvs rdiff -u -r1.1.1.5 -r1.1.1.5.20.1 \ xsrc/xfree/xc/programs/Xserver/mi/miarc.c cvs rdiff -u -r1.1.1.5 -r1.1.1.5.22.1 \ xsrc/xfree/xc/programs/Xserver/mi/misprite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/fb/fbpict.c diff -u xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4 xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4.2.1 --- xsrc/xfree/xc/programs/Xserver/fb/fbpict.c:1.4 Sat Apr 19 19:00:39 2008 +++ xsrc/xfree/xc/programs/Xserver/fb/fbpict.c Mon Jan 2 23:47:56 2012 @@ -908,7 +908,7 @@ fbCompositeSolidMask_nx1xn (CARD8 o 0x0); } -# define mod(a,b) ((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b)) +# define mod(a,b) ((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b)) void fbComposite (CARD8 op, Index: xsrc/xfree/xc/programs/Xserver/mi/miarc.c diff -u xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5.20.1 --- xsrc/xfree/xc/programs/Xserver/mi/miarc.c:1.1.1.5 Fri Mar 5 14:29:39 2004 +++ xsrc/xfree/xc/programs/Xserver/mi/miarc.c Mon Jan 2 23:47:56 2012 @@ -1554,7 +1554,7 @@ miRoundCap( # define Dsin(d) ((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0))) # define Dcos(d) ((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0))) -# define mod(a,b) ((a) = 0 ? (a) % (b) : (b) - (-a) % (b)) +# define mod(a,b) ((a) = 0 ? (a) % (b) : (b) - (-(a)) % (b)) static double miDcos (double a) Index: xsrc/xfree/xc/programs/Xserver/mi/misprite.c diff -u xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5 xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5.22.1 --- xsrc/xfree/xc/programs/Xserver/mi/misprite.c:1.1.1.5 Fri Feb 28 13:20:27 2003 +++ xsrc/xfree/xc/programs/Xserver/mi/misprite.c Mon Jan 2 23:47:56 2012 @@ -1978,7 +1978,7 @@ miSpriteLineHelper() #ifdef RENDER -# define mod(a,b) ((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-a) % (b)) +# define mod(a,b) ((b) == 1 ? 0 : (a) = 0 ? (a) % (b) : (b) - (-(a)) % (b)) static void miSpritePictureOverlap (PicturePtr pPict,
CVS commit: [netbsd-5] xsrc/xfree/xc/extras/freetype2/src/lzw
Module Name:xsrc Committed By: riz Date: Mon Aug 22 17:47:07 UTC 2011 Modified Files: xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-5]: zopen.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1661): Additional pullup to fix build on some architectures xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.3 Don't assign errno here. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.10.1 -r1.1.1.1.10.2 \ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c diff -u xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.1 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.2 --- xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c:1.1.1.1.10.1 Fri Aug 19 20:54:36 2011 +++ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c Mon Aug 22 17:47:07 2011 @@ -1,5 +1,5 @@ /* $XFree86: xc/extras/freetype2/src/lzw/zopen.c,v 1.2 2004/12/16 22:15:48 tsi Exp $ */ -/* $NetBSD: zopen.c,v 1.1.1.1.10.1 2011/08/19 20:54:36 riz Exp $ */ +/* $NetBSD: zopen.c,v 1.1.1.1.10.2 2011/08/22 17:47:07 riz Exp $ */ /*- * Copyright (c) 1985, 1986, 1992, 1993 @@ -47,7 +47,7 @@ #if 0 static char sccsid[] = @(#)zopen.c 8.1 (Berkeley) 6/27/93; #else -static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.10.1 2011/08/19 20:54:36 riz Exp $; +static char rcsid[] = $NetBSD: zopen.c,v 1.1.1.1.10.2 2011/08/22 17:47:07 riz Exp $; #endif #endif /* LIBC_SCCS and not lint */ @@ -242,7 +242,6 @@ if (code = free_ent) { if (code free_ent || oldcode == -1) { /* Bad stream. */ -errno = EINVAL; return (-1); } *stackp++ = finchar;
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: riz Date: Fri Aug 19 20:54:36 UTC 2011 Modified Files: xsrc/external/mit/freetype/dist/src/lzw [netbsd-5]: ftzopen.c xsrc/external/mit/libXfont/dist/src/fontfile [netbsd-5]: decompress.c xsrc/xfree/xc/extras/freetype2/src/lzw [netbsd-5]: zopen.c xsrc/xfree/xc/lib/font/fontfile [netbsd-5]: decompress.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1661): xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.2 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.3 src/usr.bin/gzip/zuncompress.c: revision 1.9-1.11 src/usr.bin/compress/zopen.c: revision 1.14-1.15 xsrc/xfree/xc/lib/font/fontfile/decompress.c: revision 1.2 xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2 xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.4 P Fix CVS-2011-2895, buffer overflow in decompress provisional fix for CVS-2011-2895, buffer overflow when uncompressing provisional fix for CVE-2011-2895, buffer overflow in decompression set errno on overflow return. Do proper input validation without penalizing performance. Do proper input validation. Allow decompressing all input streams. Increase robustness of LZW decoding to avoid buffer overflow on arbitrary manipulated input streams in combination with uninitalised memory. Increase strictness of LZW parser. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.10.1 \ xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.22.1 \ xsrc/xfree/xc/lib/font/fontfile/decompress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c diff -u xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1.2.1 xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1.2.2 --- xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1.2.1 Thu Jul 2 05:08:09 2009 +++ xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c Fri Aug 19 20:54:36 2011 @@ -266,7 +266,7 @@ state-block_mode = max_bits LZW_BLOCK_MASK; state-max_free = (FT_UInt)( ( 1UL state-max_bits ) - 256 ); -if ( state-max_bits LZW_MAX_BITS ) +if ( state-max_bits LZW_MAX_BITS || state-max_bits 12) goto Eof; state-num_bits = LZW_INIT_BITS; @@ -277,19 +277,7 @@ state-free_bits = state-num_bits state-max_bits ? (FT_UInt)( ( 1UL state-num_bits ) - 256 ) : state-max_free + 1; - -c = ft_lzwstate_get_code( state ); -if ( c 0 ) - goto Eof; - -old_code = old_char = (FT_UInt)c; - -if ( buffer ) - buffer[result] = (FT_Byte)old_char; - -if ( ++result = out_size ) - goto Exit; - +old_code = -1; state-phase = FT_LZW_PHASE_CODE; } /* fall-through */ @@ -309,14 +297,10 @@ if ( code == LZW_CLEAR state-block_mode ) { - /* why not LZW_FIRST-256 ? */ - state-free_ent = ( LZW_FIRST - 1 ) - 256; + state-free_ent = LZW_FIRST - 256; state-buf_clear = 1; - c = ft_lzwstate_get_code( state ); - if ( c 0 ) -goto Eof; - - code = (FT_UInt)c; + old_code = -1; + goto NextCode; } in_code = code; /* save code for later */ @@ -326,6 +310,8 @@ /* special case for KwKwKwK */ if ( code - 256U = state-free_ent ) { +if ( code - 256U state-free_ent ) + goto Eof; /* Broken stream */ FTLZW_STACK_PUSH( old_char ); code = old_code; } @@ -361,7 +347,7 @@ } /* now create new entry */ -if ( state-free_ent state-max_free ) +if ( state-free_ent state-max_free old_code != -1) { if ( state-free_ent = state-prefix_size ft_lzwstate_prefix_grow( state ) 0 ) Index: xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c diff -u xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.1.1.1.2.1 xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.1.1.1.2.2 --- xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c:1.1.1.1.2.1 Thu Sep 17 03:33:15 2009 +++ xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c Fri Aug 19 20:54:36 2011 @@ -99,7 +99,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; @@
CVS commit: [netbsd-5] xsrc/external/mit/xrdb/dist/man
Module Name:xsrc Committed By: snj Date: Thu Apr 7 06:44:14 UTC 2011 Added Files: xsrc/external/mit/xrdb/dist/man [netbsd-5]: Makefile.am Makefile.in xrdb.man Log Message: Apply patch (requested by mrg in ticket #1594): Fix CVE-2011-0465 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.1.1.2.2 xsrc/external/mit/xrdb/dist/man/Makefile.am \ xsrc/external/mit/xrdb/dist/man/Makefile.in \ xsrc/external/mit/xrdb/dist/man/xrdb.man Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: xsrc/external/mit/xrdb/dist/man/Makefile.am diff -u /dev/null xsrc/external/mit/xrdb/dist/man/Makefile.am:1.1.1.1.2.2 --- /dev/null Thu Apr 7 06:44:14 2011 +++ xsrc/external/mit/xrdb/dist/man/Makefile.am Thu Apr 7 06:44:14 2011 @@ -0,0 +1,12 @@ + +appmandir = $(APP_MAN_DIR) +appman_PRE = xrdb.man +appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) + +EXTRA_DIST = $(appman_PRE) +CLEANFILES = $(appman_DATA) +SUFFIXES = .$(APP_MAN_SUFFIX) .man + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure +.man.$(APP_MAN_SUFFIX): + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) $ $@ Index: xsrc/external/mit/xrdb/dist/man/Makefile.in diff -u /dev/null xsrc/external/mit/xrdb/dist/man/Makefile.in:1.1.1.1.2.2 --- /dev/null Thu Apr 7 06:44:14 2011 +++ xsrc/external/mit/xrdb/dist/man/Makefile.in Thu Apr 7 06:44:14 2011 @@ -0,0 +1,415 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH=$${ZSH_VERSION+.}$(PATH_SEPARATOR) cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = man +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo GEN$@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo $(srcdir) | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ +$(srcdir)/*) f=`echo $$p | sed s|^$$srcdirstrip/||`;; \ +*) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo $(srcdir) | sed 's/[].[^$$\\*|]//g'` +am__nobase_strip = \ + for p in $$list; do echo $$p; done | sed -e s|$$srcdirstrip/|| +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo $$p $$p; done | \ + sed s| $$srcdirstrip/| |;' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files[.] = } { files[$$2] = files[$$2] $$1; \ +if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = } } \ +END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = $(DESTDIR)$(appmandir) +DATA = $(appman_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APP_MAN_DIR = @APP_MAN_DIR@ +APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPP_PATH = @CPP_PATH@ +CWARNFLAGS = @CWARNFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_MAN_DIR =
CVS commit: [netbsd-5] xsrc/external/mit/xrdb/dist
Module Name:xsrc Committed By: snj Date: Thu Apr 7 16:30:26 UTC 2011 Removed Files: xsrc/external/mit/xrdb/dist [netbsd-5]: NEWS xrdb.man Log Message: Remove these two files. Missed in ticket 1594. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xrdb/dist/NEWS cvs rdiff -u -r1.1.1.1.2.1 -r0 xsrc/external/mit/xrdb/dist/xrdb.man Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-5] xsrc/external/mit/libpciaccess/dist/src
Module Name:xsrc Committed By: riz Date: Mon Mar 7 18:45:47 UTC 2011 Modified Files: xsrc/external/mit/libpciaccess/dist/src [netbsd-5]: netbsd_pci.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1557): xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c: revision 1.8 external/mit/xorg/lib/libpciaccess/Makefile: revision 1.5 external/mit/xorg/lib/libpciaccess/Makefile: revision 1.6 Fix compilation with HAVE_MTRR HAVE_MMTR -gt; HAVE_MTRR only define HAVE_MTRR on x86 To generate a diff of this commit: cvs rdiff -u -r1.4.2.3 -r1.4.2.4 \ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.4 --- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3 Sat Jan 9 01:59:59 2010 +++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Mon Mar 7 18:45:46 2011 @@ -135,7 +135,7 @@ if (map-flags PCI_DEV_MAP_FLAG_WRITABLE) prot |= PROT_WRITE; - map-memory = mmap(NULL, map-size, prot, MAP_SHARED, + map-memory = mmap(NULL, (size_t)map-size, prot, MAP_SHARED, buses[dev-domain].fd, (off_t)map-base); if (map-memory == MAP_FAILED) return errno; @@ -146,17 +146,19 @@ /* No need to set an MTRR if it's the default mode. */ if ((map-flags PCI_DEV_MAP_FLAG_CACHABLE) || (map-flags PCI_DEV_MAP_FLAG_WRITE_COMBINE)) { - m.base = base; + m.base = map-base; m.flags = MTRR_VALID | MTRR_PRIVATE; - m.len = size; + m.len = map-size; m.owner = getpid(); - if (map-flags PCI_DEV_MAP_FLAG_CACHEABLE) + if (map-flags PCI_DEV_MAP_FLAG_CACHABLE) m.type = MTRR_TYPE_WB; if (map-flags PCI_DEV_MAP_FLAG_WRITE_COMBINE) m.type = MTRR_TYPE_WC; - if ((netbsd_set_mtrr(m, n)) == -1) - ret = errno; + if ((netbsd_set_mtrr(m, n)) == -1) { + fprintf(stderr, mtrr set failed: %s\n, + strerror(errno)); + } } #endif @@ -177,7 +179,7 @@ (map-flags PCI_DEV_MAP_FLAG_WRITE_COMBINE)) { m.base = map-base; m.flags = 0; - m.len = size; + m.len = map-size; m.type = MTRR_TYPE_UC; (void)netbsd_set_mtrr(m, n); }
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-ati/dist
Module Name:xsrc Committed By: bouyer Date: Mon Feb 14 19:26:18 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-ati/dist [netbsd-5]: compile Log Message: Fix fallout from ticket #1524 (patch applied twice to new files), pointed out by veego@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xf86-video-ati/dist/compile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-ati/dist/compile diff -u xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2 xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.3 --- xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2 Sun Jan 16 14:35:52 2011 +++ xsrc/external/mit/xf86-video-ati/dist/compile Mon Feb 14 19:26:18 2011 @@ -141,146 +141,3 @@ # time-stamp-time-zone: UTC # time-stamp-end: ; # UTC # End: -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2009-10-06.20; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software -# Foundation, Inc. -# Written by Tom Tromey tro...@cygnus.com. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to bug-autom...@gnu.org or send patches to -# automake-patc...@gnu.org. - -case $1 in - '') - echo $0: No command. Try \`$0 --help' for more information. 12 - exit 1; - ;; - -h | --h*) -cat \EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to bug-autom...@gnu.org. -EOF -exit $? -;; - -v | --v*) -echo compile $scriptversion -exit $? -;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n $eat; then -eat= - else -case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x $@ -o $2 - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x $@ $1 - shift - ;; - *) - set x $@ $1 - shift - ;; -esac - fi - shift -done - -if test -z $ofile || test -z $cfile; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec $@ -fi - -# Name of file we expect compiler to create. -cofile=`echo $cfile | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo $cofile | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir $lockdir /dev/null 21; then -break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap rmdir '$lockdir'; exit 1 1 2 15 - -# Run the compile. -$@ -ret=$? - -if test -f $cofile; then - test $cofile = $ofile || mv $cofile $ofile -elif test -f ${cofile}bj; then - test ${cofile}bj = $ofile || mv ${cofile}bj $ofile -fi - -rmdir $lockdir -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: scriptversion= -# time-stamp-format: %:y-%02m-%02d.%02H -# time-stamp-time-zone: UTC -# time-stamp-end: ; # UTC -# End:
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/render
Module Name:xsrc Committed By: snj Date: Sun Apr 4 23:02:07 UTC 2010 Modified Files: xsrc/external/mit/xorg-server/dist/render [netbsd-5]: glyph.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1361): external/mit/xorg-server/dist/render/glyph.c: revision 1.2 import fdo git change 185185eeb44a277c324be0f58a4b4a469b56b69b, which i've seen twice in the last two days: Fix crash when all glyphs of a given depth are freed, but not all glyphsets This is how the crash can be triggered with only two clients on the system: Client A: (already running) Client B: Connect Client B: CreateGlyphSet(depthN) Client A: Disconnect Server: free globalGlyphs(depthN) Client B: AddGlyphs(depthN) Server: SEGV This crash was introduced with the FindGlyphsByHash function in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision, ResizeGlyphSet was always called before FindGlyphRef, which would re-create globalGlyphs(depthN) if necessary. X.Org Bug 20718 http://bugs.freedesktop.org/show_bug.cgi?id=20718 XXX: needs netbsd-5 pullup. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/render/glyph.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/render/glyph.c diff -u xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.1 Thu Sep 17 03:35:47 2009 +++ xsrc/external/mit/xorg-server/dist/render/glyph.c Sun Apr 4 23:02:07 2010 @@ -235,6 +235,9 @@ GlyphRefPtr gr; CARD32 signature = *(CARD32 *) sha1; +if (!globalGlyphs[format].hashSet) +return NULL; + gr = FindGlyphRef (globalGlyphs[format], signature, TRUE, sha1);
CVS commit: [netbsd-5] xsrc/external/mit/MesaLib/dist/src/mesa/glapi
Module Name:xsrc Committed By: snj Date: Sat Jan 30 19:09:15 UTC 2010 Modified Files: xsrc/external/mit/MesaLib/dist/src/mesa/glapi [netbsd-5]: glapi.c glapi_getproc.c glthread.c Log Message: Pull up following revision(s) (requested by rafal in ticket #1270): external/mit/MesaLib/dist/src/mesa/glapi/glapi.c: revision 1.2 external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c: revision 1.2 external/mit/MesaLib/dist/src/mesa/glapi/glthread.c: revision 1.2 Decorate some GL APIs with PUBLIC so they're available to link against; otherwise e.g. the swrast DRI module can't find _glapi_check_multithread. From http://people.freedesktop.org/~krh/glapi.patch with some tweaks. ok phone@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.2 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c Sat Jan 30 19:09:15 2010 @@ -221,7 +221,7 @@ * We should call this periodically from a function such as glXMakeCurrent * in order to test if multiple threads are being used. */ -void +PUBLIC void _glapi_check_multithread(void) { #if defined(THREADS) !defined(GLX_USE_TLS) Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.2 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c Sat Jan 30 19:09:15 2010 @@ -36,7 +36,7 @@ #include stdlib.h #include stdio.h #include glthread.h - +#include main/glheader.h /* * This file should still compile even when THREADS is not defined. @@ -71,7 +71,7 @@ */ #ifdef PTHREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) pthread_self(); @@ -125,7 +125,7 @@ #define USE_LOCK_FOR_KEY /* undef this to try a version without lock for the global key... */ -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { abort(); /* XXX not implemented yet */ @@ -203,7 +203,7 @@ DWORD dwErr=GetLastError(); } -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return GetCurrentThreadId(); @@ -304,7 +304,7 @@ */ #ifdef BEOS_THREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) find_thread(NULL); @@ -346,7 +346,7 @@ * no-op functions */ -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return 0; Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.3 --- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2 Thu Sep 17 03:32:30 2009 +++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c Sat Jan 30 19:09:15 2010 @@ -563,7 +563,7 @@ * in the name of static functions, try generating a new API entrypoint on * the fly with assembly language. */ -_glapi_proc +PUBLIC _glapi_proc _glapi_get_proc_address(const char *funcName) { struct _glapi_function * entry;
CVS commit: [netbsd-5] xsrc/external/mit/expat/dist/lib
Module Name:xsrc Committed By: bouyer Date: Wed Jan 27 20:43:00 UTC 2010 Modified Files: xsrc/external/mit/expat/dist/lib [netbsd-5]: xmlparse.c Log Message: Pull up following revision(s) (requested by tron in ticket #1283): xsrc/external/mit/expat/dist/lib/xmlparse.c: revision 1.2 Add patch from upstream CVS to fix CVE-2009-3560 (possible DOS due to crash on bad input). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/expat/dist/lib/xmlparse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/expat/dist/lib/xmlparse.c diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 --- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1 Tue Jul 29 05:35:07 2008 +++ xsrc/external/mit/expat/dist/lib/xmlparse.c Wed Jan 27 20:43:00 2010 @@ -3703,6 +3703,9 @@ return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; + case -XML_TOK_PROLOG_S: + tok = -tok; + break; case XML_TOK_NONE: #ifdef XML_DTD /* for internal PE NOT referenced between declarations */
CVS commit: [netbsd-5] xsrc/xfree/xc/extras/expat/lib
Module Name:xsrc Committed By: bouyer Date: Wed Jan 27 20:44:22 UTC 2010 Modified Files: xsrc/xfree/xc/extras/expat/lib [netbsd-5]: xmlparse.c Log Message: Pull up following revision(s) (requested by tron in ticket #1284): xsrc/xfree/xc/extras/expat/lib/xmlparse.c: revision 1.2 Add patch from upstream CVS to fix CVE-2009-3560 (possible DOS due to crash on bad input). To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.1.1.2.20.1 \ xsrc/xfree/xc/extras/expat/lib/xmlparse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/extras/expat/lib/xmlparse.c diff -u xsrc/xfree/xc/extras/expat/lib/xmlparse.c:1.1.1.2 xsrc/xfree/xc/extras/expat/lib/xmlparse.c:1.1.1.2.20.1 --- xsrc/xfree/xc/extras/expat/lib/xmlparse.c:1.1.1.2 Fri Mar 5 14:26:08 2004 +++ xsrc/xfree/xc/extras/expat/lib/xmlparse.c Wed Jan 27 20:44:22 2010 @@ -3253,6 +3253,9 @@ return XML_ERROR_UNCLOSED_TOKEN; case XML_TOK_PARTIAL_CHAR: return XML_ERROR_PARTIAL_CHAR; + case -XML_TOK_PROLOG_S: + tok = -tok; + break; case XML_TOK_NONE: #ifdef XML_DTD if (enc != encoding)
CVS commit: [netbsd-5] xsrc/external/mit
Module Name:xsrc Committed By: snj Date: Mon Jan 11 00:42:35 UTC 2010 Modified Files: xsrc/external/mit/libFS/include [netbsd-5]: config.h xsrc/external/mit/pixman/include [netbsd-5]: config.h xsrc/external/mit/xf86-video-siliconmotion/include [netbsd-5]: config.h xsrc/external/mit/xmag/include [netbsd-5]: config.h xsrc/external/mit/xwininfo/include [netbsd-5]: config.h Log Message: Apply patch (requested by veego in ticket #1234): Regenerate a few config.h files. Should have been done with the big X.Org update. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 xsrc/external/mit/libFS/include/config.h cvs rdiff -u -r1.2.2.2 -r1.2.2.3 xsrc/external/mit/pixman/include/config.h cvs rdiff -u -r1.3.2.2 -r1.3.2.3 \ xsrc/external/mit/xf86-video-siliconmotion/include/config.h cvs rdiff -u -r1.1 -r1.1.2.1 xsrc/external/mit/xmag/include/config.h cvs rdiff -u -r1.1 -r1.1.2.1 xsrc/external/mit/xwininfo/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libFS/include/config.h diff -u xsrc/external/mit/libFS/include/config.h:1.1.2.1 xsrc/external/mit/libFS/include/config.h:1.1.2.2 --- xsrc/external/mit/libFS/include/config.h:1.1.2.1 Thu Sep 17 03:32:53 2009 +++ xsrc/external/mit/libFS/include/config.h Mon Jan 11 00:42:34 2010 @@ -10,6 +10,9 @@ /* Define to 1 if you have the inttypes.h header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +/* #undef HAVE_LIBWS2_32 */ + /* Define to 1 if you have the memory.h header file. */ #define HAVE_MEMORY_H 1 @@ -83,4 +86,4 @@ #define UNIXCONN 1 /* Version number of package */ -#define VERSION 1.0.1 +#define VERSION 1.0.2 Index: xsrc/external/mit/pixman/include/config.h diff -u xsrc/external/mit/pixman/include/config.h:1.2.2.2 xsrc/external/mit/pixman/include/config.h:1.2.2.3 --- xsrc/external/mit/pixman/include/config.h:1.2.2.2 Tue Dec 1 23:16:33 2009 +++ xsrc/external/mit/pixman/include/config.h Mon Jan 11 00:42:34 2010 @@ -16,6 +16,9 @@ /* Define to 1 if you have the memory.h header file. */ #define HAVE_MEMORY_H 1 +/* Whether we have posix_memalign() */ +#define HAVE_POSIX_MEMALIGN 1 + /* Define to 1 if you have the stdint.h header file. */ #define HAVE_STDINT_H 1 Index: xsrc/external/mit/xf86-video-siliconmotion/include/config.h diff -u xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.2 xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.3 --- xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.2 Thu Sep 17 03:34:21 2009 +++ xsrc/external/mit/xf86-video-siliconmotion/include/config.h Mon Jan 11 00:42:35 2010 @@ -33,12 +33,11 @@ /* Define to 1 if you have the unistd.h header file. */ #define HAVE_UNISTD_H 1 -/* X server has new mode code */ -/* #undef HAVE_XMODES */ +/* xextproto 7.1 available */ +/* #undef HAVE_XEXTPROTO_71 */ -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR .libs/ +/* X server has new mode code */ +#define HAVE_XMODES 1 /* Name of package */ #define PACKAGE xf86-video-siliconmotion Index: xsrc/external/mit/xmag/include/config.h diff -u xsrc/external/mit/xmag/include/config.h:1.1 xsrc/external/mit/xmag/include/config.h:1.1.2.1 --- xsrc/external/mit/xmag/include/config.h:1.1 Wed Jul 30 05:42:21 2008 +++ xsrc/external/mit/xmag/include/config.h Mon Jan 11 00:42:35 2010 @@ -1,6 +1,12 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if you have the inttypes.h header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H 1 + /* Define to 1 if you have the `nanosleep' function. */ #define HAVE_NANOSLEEP 1 @@ -10,6 +16,27 @@ /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 +/* Define to 1 if you have the stdint.h header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the stdlib.h header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the strings.h header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the string.h header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the sys/stat.h header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the sys/types.h header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the unistd.h header file. */ +#define HAVE_UNISTD_H 1 + /* Name of package */ #define PACKAGE xmag @@ -20,13 +47,13 @@ #define PACKAGE_NAME xmag /* Define to the full name and version of this package. */ -#define PACKAGE_STRING xmag 1.0.2 +#define PACKAGE_STRING xmag 1.0.3 /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME xmag /* Define to the
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-radeonhd/dist/src
Module Name:xsrc Committed By: snj Date: Sat Jan 9 01:27:39 UTC 2010 Modified Files: xsrc/external/mit/xf86-video-radeonhd/dist/src [netbsd-5]: rhd_id.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #1214): external/mit/xf86-video-radeonhd/dist/src/rhd_id.c: revision 1.2 Fix incorrect LIST_END macro. From xf86-video-radeonhd commit cc1bb50bb44354be7793e4fc45c625746571ec96. Fixes PR/41950. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.2.1 -r1.1.1.2.2.2 \ xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c diff -u xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.1 xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.2 --- xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.1 Thu Sep 17 03:34:13 2009 +++ xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c Sat Jan 9 01:27:39 2010 @@ -99,7 +99,7 @@ # define RHD_DEVICE_MATCH(d, i) \ { 0x1002, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } # define PCI_ID_LIST struct pci_id_match RHDDeviceMatch[] -# define LIST_END { 0, 0, (~0), (~0), 0, 0, 0 } +# define LIST_END { 0, 0, 0, 0, 0, 0, 0 } #else # define RHD_DEVICE_ENTRY(d, i, r) \ { (i), (d), r }
CVS commit: [netbsd-5] xsrc/external/mit/libpciaccess/dist/src
Module Name:xsrc Committed By: snj Date: Sat Jan 9 02:00:00 UTC 2010 Modified Files: xsrc/external/mit/libpciaccess/dist/src [netbsd-5]: netbsd_pci.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1228): external/mit/libpciaccess/dist/src/netbsd_pci.c: revision 1.5 if a VGA device isn't enabled for io/mem/bus-master, do so here. xorg-server 1.4.x and earlier would do this for us. partly fixes dual-head support for various systems. idea from mhitch. To generate a diff of this commit: cvs rdiff -u -r1.4.2.2 -r1.4.2.3 \ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.2 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3 --- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.2 Thu Sep 17 03:33:29 2009 +++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Sat Jan 9 01:59:59 2010 @@ -272,6 +272,21 @@ dev = device-dev; func = device-func; + /* Enable the device if necessary */ + err = pci_read(domain, bus, dev, func, PCI_COMMAND_STATUS_REG, reg); + if (err) + return err; + if ((reg (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) != + (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) { + reg |= PCI_COMMAND_IO_ENABLE | + PCI_COMMAND_MEM_ENABLE | + PCI_COMMAND_MASTER_ENABLE; + err = pci_write(domain, bus, dev, func, PCI_COMMAND_STATUS_REG, +reg); + if (err) + return err; + } + err = pci_read(domain, bus, dev, func, PCI_BHLC_REG, reg); if (err) return err; @@ -454,7 +469,7 @@ struct pci_device_private *device; int bus, dev, func, ndevs, nfuncs, domain, pcifd; uint32_t reg; - char devname[32]; + char netbsd_devname[32]; struct pciio_businfo businfo; pci_sys = calloc(1, sizeof(struct pci_system)); @@ -463,8 +478,8 @@ ndevs = 0; nbuses = 0; - snprintf(devname, 32, /dev/pci%d, nbuses); - pcifd = open(devname, O_RDWR); + snprintf(netbsd_devname, 32, /dev/pci%d, nbuses); + pcifd = open(netbsd_devname, O_RDWR); while (pcifd 0) { ioctl(pcifd, PCI_IOC_BUSINFO, businfo); buses[nbuses].fd = pcifd; @@ -485,8 +500,8 @@ ndevs++; } } - snprintf(devname, 32, /dev/pci%d, nbuses); - pcifd = open(devname, O_RDWR); + snprintf(netbsd_devname, 32, /dev/pci%d, nbuses); + pcifd = open(netbsd_devname, O_RDWR); } pci_sys-num_devices = ndevs;
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-radeonhd/include
Module Name:xsrc Committed By: snj Date: Tue Dec 1 19:34:32 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-radeonhd/include [netbsd-5]: config.h Log Message: Apply patch (requested by rafal in ticket 1160): Regenerate xf86-video-radeonhd's config.h. To generate a diff of this commit: cvs rdiff -u -r1.2.2.1 -r1.2.2.2 \ xsrc/external/mit/xf86-video-radeonhd/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-radeonhd/include/config.h diff -u xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.1 xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.2 --- xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.1 Thu Sep 17 03:34:13 2009 +++ xsrc/external/mit/xf86-video-radeonhd/include/config.h Tue Dec 1 19:34:32 2009 @@ -20,7 +20,7 @@ #define HAVE_DLFCN_H 1 /* have RotateFreeShadow API */ -/* #undef HAVE_FREE_SHADOW */ +#define HAVE_FREE_SHADOW 1 /* Define to 1 if you have the inttypes.h header file. */ #define HAVE_INTTYPES_H 1 @@ -99,7 +99,7 @@ #define STDC_HEADERS 1 /* Build support for DRI */ -/* #undef USE_DRI */ +#define USE_DRI 1 /* Build support for Exa */ #define USE_EXA 1 @@ -108,6 +108,6 @@ #define VERSION 1.2.5 /* xf86CrtcFuncsRec has member set_mode_major */ -/* #undef XF86CRTCFUNCS_HAS_SETMODEMAJOR */ +#define XF86CRTCFUNCS_HAS_SETMODEMAJOR 1 #endif
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-ati/include
Module Name:xsrc Committed By: snj Date: Tue Dec 1 19:44:53 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-ati/include [netbsd-5]: config.h Log Message: Apply patch (requested by rafal in ticket 1176): Regenerate xf86-video-ati's config.h. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \ xsrc/external/mit/xf86-video-ati/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-ati/include/config.h diff -u xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.1 xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.2 --- xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.1 Thu Sep 17 03:33:47 2009 +++ xsrc/external/mit/xf86-video-ati/include/config.h Tue Dec 1 19:44:53 2009 @@ -16,7 +16,7 @@ #define HAVE_DLFCN_H 1 /* have new FreeShadow API */ -/* #undef HAVE_FREE_SHADOW */ +#define HAVE_FREE_SHADOW 1 /* Define to 1 if you have the inttypes.h header file. */ #define HAVE_INTTYPES_H 1 @@ -25,7 +25,7 @@ #define HAVE_MEMORY_H 1 /* Have pci_device_enable prototype */ -/* #undef HAVE_PCI_DEVICE_ENABLE */ +#define HAVE_PCI_DEVICE_ENABLE 1 /* Define to 1 if you have the stdint.h header file. */ #define HAVE_STDINT_H 1 @@ -49,10 +49,10 @@ #define HAVE_UNISTD_H 1 /* Have xf86_crtc_clip_video_helper prototype */ -/* #undef HAVE_XF86CRTCCLIPVIDEOHELPER */ +#define HAVE_XF86CRTCCLIPVIDEOHELPER 1 /* Have xf86ModeBandwidth prototype */ -/* #undef HAVE_XF86MODEBANDWIDTH */ +#define HAVE_XF86MODEBANDWIDTH 1 /* Have xf86XVFillKeyHelperDrawable prototype */ #define HAVE_XV_DRAWABLE_HELPER 1
CVS commit: [netbsd-5] xsrc/external/mit/pixman/dist
Module Name:xsrc Committed By: snj Date: Tue Dec 1 23:18:41 UTC 2009 Added Files: xsrc/external/mit/pixman/dist/pixman [netbsd-5]: pixman-x64-mmx-emulation.h xsrc/external/mit/pixman/dist/test [netbsd-5]: blitters-test.c window-test.c Log Message: Apply patch (requested by mrg in ticket 1177): Update pixman to 0.16.2. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.1.1.2.2 \ xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h cvs rdiff -u -r0 -r1.1.1.1.2.2 \ xsrc/external/mit/pixman/dist/test/blitters-test.c \ xsrc/external/mit/pixman/dist/test/window-test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h diff -u /dev/null xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h:1.1.1.1.2.2 --- /dev/null Tue Dec 1 23:18:41 2009 +++ xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h Tue Dec 1 23:18:40 2009 @@ -0,0 +1,263 @@ +#ifndef MMX_X64_H_INCLUDED +#define MMX_X64_H_INCLUDED + +/* Implementation of x64 MMX substitition functions, before + * pixman is reimplemented not to use __m64 type on Visual C++ + * + * Copyright (C)2009 by George Yohng + * Released in public domain. + */ + +#include intrin.h + +#define M64C(a) (*(const __m64 *)(a)) +#define M64U(a) (*(const unsigned long long *)(a)) + +__inline __m64 +_m_from_int (int a) +{ +long long i64 = a; + +return M64C (i64); +} + +__inline __m64 +_mm_setzero_si64 () +{ +long long i64 = 0; + +return M64C (i64); +} + +__inline __m64 +_mm_set_pi32 (int i1, int i0) +{ +unsigned long long i64 = ((unsigned)i0) + (((unsigned long long)(unsigned)i1) 32); + +return M64C (i64); +} + +__inline void +_m_empty () +{ +} + +__inline __m64 +_mm_set1_pi16 (short w) +{ +unsigned long long i64 = ((unsigned long long)(unsigned short)(w)) * 0x0001000100010001ULL; + +return M64C (i64); +} + +__inline int +_m_to_int (__m64 m) +{ +return m.m64_i32[0]; +} + +__inline __m64 +_mm_movepi64_pi64 (__m128i a) +{ +return M64C (a.m128i_i64[0]); +} + +__inline __m64 +_m_pand (__m64 a, __m64 b) +{ +unsigned long long i64 = M64U (a) M64U (b); + +return M64C (i64); +} + +__inline __m64 +_m_por (__m64 a, __m64 b) +{ +unsigned long long i64 = M64U (a) | M64U (b); + +return M64C (i64); +} + +__inline __m64 +_m_pxor (__m64 a, __m64 b) +{ +unsigned long long i64 = M64U (a) ^ M64U (b); + +return M64C (i64); +} + +__inline __m64 +_m_pmulhuw (__m64 a, __m64 b)/* unoptimized */ +{ +unsigned short d[4] = +{ + (unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0]) 16), + (unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1]) 16), + (unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2]) 16), + (unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3]) 16) +}; + +return M64C (d[0]); +} + +__inline __m64 +_m_pmullw2 (__m64 a, __m64 b)/* unoptimized */ +{ +unsigned short d[4] = +{ + (unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0])), + (unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1])), + (unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2])), + (unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3])) +}; + +return M64C (d[0]); +} + +__inline __m64 +_m_pmullw (__m64 a, __m64 b)/* unoptimized */ +{ +unsigned long long x = + ((unsigned long long)(unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0]))) + + (((unsigned long long)(unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1]))) 16) + + (((unsigned long long)(unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2]))) 32) + + (((unsigned long long)(unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3]))) 48); + +return M64C (x); +} + +__inline __m64 +_m_paddusb (__m64 a, __m64 b)/* unoptimized */ +{ +unsigned long long x = (M64U (a) 0x00FF00FF00FF00FFULL) + + (M64U (b) 0x00FF00FF00FF00FFULL); + +unsigned long long y = ((M64U (a) 8) 0x00FF00FF00FF00FFULL) + + ((M64U (b) 8) 0x00FF00FF00FF00FFULL); + +x |= ((x 0xFF00FF00FF00FF00ULL) 8) * 0xFF; +y |= ((y 0xFF00FF00FF00FF00ULL) 8) * 0xFF; + +x = (x 0x00FF00FF00FF00FFULL) | ((y 0x00FF00FF00FF00FFULL) 8); + +return M64C (x); +} + +__inline __m64 +_m_paddusw (__m64 a, __m64 b)/* unoptimized */ +{ +unsigned long long x = (M64U (a) 0xULL) + + (M64U (b) 0xULL); + +unsigned long long y = ((M64U (a) 16) 0xULL) + + ((M64U (b) 16) 0xULL); + +x |= ((x 0x) 16) * 0x; +y |= ((y 0x) 16) * 0x; + +x = (x 0xULL) | ((y 0xULL) 16); + +return M64C (x); +} +
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:20:23 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime.h crime_accel.c crime_driver.c Log Message: Pull up following revision(s) (requested by macallan in ticket #1052): external/mit/xf86-video-crime/dist/src/crime.h: revision 1.7 external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.11 external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.4 clean up debugging code, while there: - use a fake framebuffer like newport does to hide software rendering artifacts - only map the framebuffer when debugging, and actually unmap it too To generate a diff of this commit: cvs rdiff -u -r1.2.2.6 -r1.2.2.7 \ xsrc/external/mit/xf86-video-crime/dist/src/crime.h cvs rdiff -u -r1.3.2.9 -r1.3.2.10 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c cvs rdiff -u -r1.2.2.4 -r1.2.2.5 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime.h diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.6 xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.7 --- xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.6 Thu Sep 17 03:33:50 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime.h Fri Oct 16 06:20:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.h,v 1.2.2.6 2009/09/17 03:33:50 snj Exp $ */ +/* $NetBSD: crime.h,v 1.2.2.7 2009/10/16 06:20:23 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -44,7 +44,7 @@ #ifndef CRIME_H #define CRIME_H -#define CRIME_DEBUG +/*#define CRIME_DEBUG*/ #define CRIME_DEBUG_LINES 0x0001 #define CRIME_DEBUG_BITBLT 0x0002 @@ -56,7 +56,7 @@ #define CRIME_DEBUG_XRENDER 0x0080 #define CRIME_DEBUG_IMAGEREAD 0x0100 #define CRIME_DEBUG_ALL 0x -#define CRIME_DEBUG_MASK (/*CRIME_DEBUG_IMAGEWRITE*/0) +#define CRIME_DEBUG_MASK 0 #ifdef CRIME_DEBUG #define LOG(x) if (x CRIME_DEBUG_MASK) xf86Msg(X_ERROR, %s\n, __func__) Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.9 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.9 Thu Sep 17 03:33:50 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Fri Oct 16 06:20:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.9 2009/09/17 03:33:50 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.10 2009/10/16 06:20:23 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -34,6 +34,7 @@ #include crime.h #include picturestr.h #include xaalocal.h +#include xaa.h uint32_t regcache[0x1000]; @@ -48,7 +49,7 @@ #define WRITE4(r, v) { *CRIMEREG(r) = v; } #endif #define WRITE4ST(r, v) {WBFLUSH; *CRIMEREG(r + CRIME_DE_START) = v; WBFLUSH;} -#ifdef DEBUG +#ifdef CRIME_DEBUG #define SYNC { int bail = 0; do {bail++; } \ while(((*CRIMEREG(0x4000) CRIME_DE_IDLE) == 0) (bail 1000)); \ if (bail == 1000) { \ @@ -176,7 +177,6 @@ WRITE4(CRIME_MTE_SRC1, (rxe 16) | rye); WRITE4(CRIME_MTE_DST0, (rxd 16) | ryd); WRITE4ST(CRIME_MTE_DST1, (rxde 16) | ryde); - //xf86Msg(X_ERROR, MTE); #ifdef CRIME_DEBUG_LOUD xf86Msg(X_ERROR, reg: %08x %08x\n, oreg, reg); @@ -227,6 +227,7 @@ int i; LOG(CRIME_DEBUG_RECTFILL); +#ifdef MTE_DRAW_RECT if (rop == GXcopy) { fPtr-use_mte = 1; MAKE_ROOM(3); @@ -237,7 +238,9 @@ WRITE4(CRIME_MTE_DST_Y_STEP, 1); WRITE4(CRIME_MTE_BG, colour 8); SYNCMTE; - } else { + } else +#endif + { fPtr-use_mte = 0; MAKE_ROOM(7); WRITE4(CRIME_DE_PLANEMASK, planemask); @@ -270,6 +273,7 @@ int xa, xe, ya, ye; LOG(CRIME_DEBUG_RECTFILL); +#ifdef MTE_DRAW_RECT if (fPtr-use_mte) { /* @@ -286,7 +290,9 @@ WRITE4ST(CRIME_MTE_DST1, (((xe 2) - 1 ) 16) | ((ye - 1) 0x)); } - } else { + } else +#endif + { MAKE_ROOM(2); WRITE4(CRIME_DE_X_VERTEX_0, (x 16) | (y 0x)); WRITE4ST(CRIME_DE_X_VERTEX_1, @@ -582,7 +588,7 @@ WRITE4(CRIME_DE_X_VERTEX_0, (x1 16) | y1); WRITE4ST(CRIME_DE_X_VERTEX_1, (x2 16) | y2); DONE(CRIME_DEBUG_LINES); -} +} void CrimeSetupForDashedLine(ScrnInfoPtr pScrn, Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.4 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.4 Thu Sep 17 03:33:50 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Fri Oct 16 06:20:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_driver.c,v 1.2.2.4 2009/09/17 03:33:50 snj Exp $ */
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:23:35 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa [netbsd-5]: xaaGC.c xaalocal.h Log Message: Pull up following revision(s) (requested by macallan in ticket #1052): external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c: revision 1.2 external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h: revision 1.4 don't fall back to software rendering when drawing into the screen pixmap this takes care of visible artifacts with non-mappable framebuffers like newport and crime To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.1 Thu Sep 17 03:35:21 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c Fri Oct 16 06:23:35 2009 @@ -88,7 +88,8 @@ pGC-fgPixel = 0x7fff; } -if((pDraw-type == DRAWABLE_PIXMAP) !IS_OFFSCREEN_PIXMAP(pDraw)){ +if((pDraw-type == DRAWABLE_PIXMAP) + !IS_OFFSCREEN_PIXMAP(pDraw) !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) { pGCPriv-flags = OPS_ARE_PIXMAP; pGCPriv-changes |= changes; Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.2 Thu Sep 17 03:35:21 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h Fri Oct 16 06:23:35 2009 @@ -1710,6 +1710,9 @@ #define IS_OFFSCREEN_PIXMAP(pPix)\ ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-offscreenArea) +#define PIXMAP_IS_SCREEN(pPix, pGC)\ +(pPix == pGC-pScreen-GetScreenPixmap(pGC-pScreen)) + #define PIXMAP_IS_SHARED(pPix)\ ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-flags SHARED_PIXMAP)
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:50:20 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa [netbsd-5]: xaaGC.c xaalocal.h Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c: revision 1.3 external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h: revision 1.5 simplify PIXMAP_IS_SCREEN() To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.3 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2 Fri Oct 16 06:23:35 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c Fri Oct 16 06:50:20 2009 @@ -89,7 +89,8 @@ } if((pDraw-type == DRAWABLE_PIXMAP) - !IS_OFFSCREEN_PIXMAP(pDraw) !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) { + !IS_OFFSCREEN_PIXMAP(pDraw) + !PIXMAP_IS_SCREEN(pDraw)) { pGCPriv-flags = OPS_ARE_PIXMAP; pGCPriv-changes |= changes; Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.4 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3 Fri Oct 16 06:23:35 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h Fri Oct 16 06:50:20 2009 @@ -1710,8 +1710,8 @@ #define IS_OFFSCREEN_PIXMAP(pPix)\ ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-offscreenArea) -#define PIXMAP_IS_SCREEN(pPix, pGC)\ -(pPix == pGC-pScreen-GetScreenPixmap(pGC-pScreen)) +#define PIXMAP_IS_SCREEN(pDraw)\ +(pDraw == (void *)pDraw-pScreen-GetScreenPixmap(pDraw-pScreen)) #define PIXMAP_IS_SHARED(pPix)\ ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))-flags SHARED_PIXMAP)
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/common
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:52:05 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/common [netbsd-5]: xf86Configure.c Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c: revision 1.3 let xf86AddBusDeviceToConfigure() accept BUS_ISA and BUS_NONE To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.1 Thu Sep 17 03:35:09 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c Fri Oct 16 06:52:05 2009 @@ -123,6 +123,9 @@ return NULL; break; #endif +case BUS_NONE: +case BUS_ISA: + break; default: return NULL; } @@ -215,6 +218,11 @@ } break; #endif +case BUS_ISA: { +NewDevice.GDev.busID = xnfalloc(6); +strcpy(NewDevice.GDev.busID, ISA); +} +break; default: break; }
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:53:28 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.12 use PIXMAP_IS_SCREEN() To generate a diff of this commit: cvs rdiff -u -r1.3.2.10 -r1.3.2.11 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.11 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10 Fri Oct 16 06:20:23 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Fri Oct 16 06:53:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.10 2009/10/16 06:20:23 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.11 2009/10/16 06:53:28 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -1704,9 +1704,11 @@ return FALSE; if((pDst-pDrawable-type == DRAWABLE_WINDOW) || - IS_OFFSCREEN_PIXMAP(pDst-pDrawable)) { + IS_OFFSCREEN_PIXMAP(pDst-pDrawable) || + PIXMAP_IS_SCREEN(pDst-pDrawable)) { if ((pSrc-pDrawable-type == DRAWABLE_WINDOW) || - IS_OFFSCREEN_PIXMAP(pSrc-pDrawable)) { + IS_OFFSCREEN_PIXMAP(pSrc-pDrawable) || + PIXMAP_IS_SCREEN(pSrc-pDrawable)) { /* screen-to-screen */ CrimeDoScreenToScreenComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:54:59 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_driver.c Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.5 make X -configure work with the crime driver To generate a diff of this commit: cvs rdiff -u -r1.2.2.5 -r1.2.2.6 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5 Fri Oct 16 06:20:23 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Fri Oct 16 06:54:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_driver.c,v 1.2.2.5 2009/10/16 06:20:23 snj Exp $ */ +/* $NetBSD: crime_driver.c,v 1.2.2.6 2009/10/16 06:54:59 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -304,8 +304,6 @@ char *dev; Bool foundScreen = FALSE; - xf86Msg(X_ERROR, %s\n, __func__); - if ((numDevSections = xf86MatchDevice(CRIME_DRIVER_NAME, devSections)) = 0) return FALSE; @@ -313,45 +311,60 @@ if ((fd = crime_open(CRIME_DEFAULT_DEV)) == 0) return FALSE; - xf86Msg(X_ERROR, %s: fd found\n, __func__); + xf86Msg(X_DEBUG, %s: fd found\n, __func__); if (ioctl(fd, WSDISPLAYIO_GTYPE, wstype) == -1) return FALSE; - xf86Msg(X_ERROR, %s: type: %d\n, __func__, wstype); + xf86Msg(X_DEBUG, %s: type: %d\n, __func__, wstype); if (wstype != WSDISPLAY_TYPE_CRIME) return FALSE; - xf86Msg(X_ERROR, %s: CRIME found\n, __func__); + xf86Msg(X_INFO, %s: CRIME found\n, __func__); + + if ( xf86DoConfigure xf86DoConfigurePass1 ) { + GDevPtr pGDev; + + xf86Msg(X_DEBUG, writing device section\n); + pGDev = xf86AddBusDeviceToConfigure(CRIME_DRIVER_NAME, BUS_NONE, + NULL, 0); + if (pGDev) { + /* + * XF86Match???Instances() treat chipID and chipRev as + * overrides, so clobber them here. + */ + xf86Msg(X_DEBUG, clobbering chipID etc. \n); + pGDev-chipID = pGDev-chipRev = -1; + } + } - if (flags PROBE_DETECT) + if (flags PROBE_DETECT) { return TRUE; + } + if (numDevSections 1) { + xf86Msg(X_ERROR, Ignoring additional device sections\n); + numDevSections = 1; + } /* ok, at this point we know we've got a CRIME */ for (i = 0; i numDevSections; i++) { - dev = xf86FindOptionValue(devSections[i]-options, device); - if ((fd = crime_open(dev)) = 0) { - entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE); - pScrn = xf86ConfigFbEntity(NULL,0,entity, - NULL,NULL,NULL,NULL); - if (pScrn != NULL) { -foundScreen = TRUE; -pScrn-driverVersion = VERSION; -pScrn-driverName = CRIME_DRIVER_NAME; -pScrn-name = CRIME_NAME; -pScrn-Probe = CrimeProbe; -pScrn-PreInit = CrimePreInit; -pScrn-ScreenInit = CrimeScreenInit; -pScrn-SwitchMode = CrimeSwitchMode; -pScrn-AdjustFrame = NULL; -pScrn-EnterVT = CrimeEnterVT; -pScrn-LeaveVT = CrimeLeaveVT; -pScrn-ValidMode = CrimeValidMode; - -xf86DrvMsg(pScrn-scrnIndex, X_INFO, -using %s\n, dev != NULL ? dev : -default device); - } + entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE); + pScrn = xf86ConfigFbEntity(NULL, 0, entity, + NULL, NULL, NULL, NULL); + if (pScrn != NULL) { + foundScreen = TRUE; + pScrn-driverVersion = VERSION; + pScrn-driverName = CRIME_DRIVER_NAME; + pScrn-name = CRIME_NAME; + pScrn-Probe = CrimeProbe; + pScrn-PreInit = CrimePreInit; + pScrn-ScreenInit = CrimeScreenInit; + pScrn-SwitchMode = CrimeSwitchMode; + pScrn-AdjustFrame = NULL; + pScrn-EnterVT = CrimeEnterVT; + pScrn-LeaveVT = CrimeLeaveVT; + pScrn-ValidMode = CrimeValidMode; + } } xfree(devSections);
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:56:02 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_driver.c Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.6 remove debug spam To generate a diff of this commit: cvs rdiff -u -r1.2.2.6 -r1.2.2.7 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.7 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6 Fri Oct 16 06:54:59 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c Fri Oct 16 06:56:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_driver.c,v 1.2.2.6 2009/10/16 06:54:59 snj Exp $ */ +/* $NetBSD: crime_driver.c,v 1.2.2.7 2009/10/16 06:56:02 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -311,11 +311,9 @@ if ((fd = crime_open(CRIME_DEFAULT_DEV)) == 0) return FALSE; - xf86Msg(X_DEBUG, %s: fd found\n, __func__); if (ioctl(fd, WSDISPLAYIO_GTYPE, wstype) == -1) return FALSE; - xf86Msg(X_DEBUG, %s: type: %d\n, __func__, wstype); if (wstype != WSDISPLAY_TYPE_CRIME) return FALSE; @@ -324,7 +322,6 @@ if ( xf86DoConfigure xf86DoConfigurePass1 ) { GDevPtr pGDev; - xf86Msg(X_DEBUG, writing device section\n); pGDev = xf86AddBusDeviceToConfigure(CRIME_DRIVER_NAME, BUS_NONE, NULL, 0); if (pGDev) { @@ -332,7 +329,6 @@ * XF86Match???Instances() treat chipID and chipRev as * overrides, so clobber them here. */ - xf86Msg(X_DEBUG, clobbering chipID etc. \n); pGDev-chipID = pGDev-chipRev = -1; } }
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-newport/dist/src
Module Name:xsrc Committed By: snj Date: Fri Oct 16 06:58:54 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-newport/dist/src [netbsd-5]: newport_cmap.c newport_driver.c newport_regs.c newport_regs.h Log Message: Pull up following revision(s) (requested by macallan in ticket #1092): external/mit/xf86-video-newport/dist/src/newport_cmap.c: revision 1.2 external/mit/xf86-video-newport/dist/src/newport_driver.c: revision 1.5 external/mit/xf86-video-newport/dist/src/newport_regs.c: revision 1.2 external/mit/xf86-video-newport/dist/src/newport_regs.h: revision 1.2 make this work in the New Order Of Things(tm): - make Xorg -configure work again - fix the DCB timing when talking to XMAP9 to the values used by the kernel, now colours look right on my Indy and all the randomness when starting X is gone To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \ xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c \ xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c \ xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.h cvs rdiff -u -r1.3.2.3 -r1.3.2.4 \ xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c diff -u xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.2 xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.3 --- xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.2 Wed Feb 25 21:31:00 2009 +++ xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c Fri Oct 16 06:58:54 2009 @@ -71,7 +71,8 @@ } #endif for(i = 0; i 256; i++) { - NewportCmapSetRGB(pNewport-pNewportRegs, i, pNewport-txt_colormap[i]); + NewportCmapSetRGB(pNewport-pNewportRegs, i, + pNewport-txt_colormap[i]); } } @@ -80,8 +81,8 @@ static void NewportCmapFifoWait(NewportRegsPtr pNewportRegs) { while(1) { - pNewportRegs-set.dcbmode = (NPORT_DMODE_ACM0 | NCMAP_PROTOCOL | - NCMAP_REGADDR_SREG | NPORT_DMODE_W1); + pNewportRegs-set.dcbmode = (NPORT_DMODE_ACM0 | NCMAP_PROTOCOL | + NCMAP_REGADDR_SREG | NPORT_DMODE_W1); if(!(pNewportRegs-set.dcbdata0.bytes.b3 4)) break; } @@ -91,6 +92,7 @@ /* set the colormap entry at addr to color */ void NewportCmapSetRGB( NewportRegsPtr pNewportRegs, unsigned short addr, LOCO color) { + uint32_t colour; NewportWait(pNewportRegs); /* this one should not be necessary */ NewportBfwait(pNewportRegs); pNewportRegs-set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL | @@ -99,9 +101,9 @@ pNewportRegs-set.dcbdata0.hwords.s1 = addr; pNewportRegs-set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL | NCMAP_REGADDR_PBUF | NPORT_DMODE_W3); - pNewportRegs-set.dcbdata0.all = (color.red 24) | - (color.green 16) | + colour = (color.red 24) | (color.green 16) | (color.blue 8); + pNewportRegs-set.dcbdata0.all = colour; } /* get the colormap entry at addr */ Index: xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c diff -u xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.2 xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.3 --- xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.2 Wed Feb 25 21:31:00 2009 +++ xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c Fri Oct 16 06:58:54 2009 @@ -14,19 +14,19 @@ void NewportVc2Set(NewportRegsPtr pNewportRegs, unsigned char vc2Ireg, unsigned short val) { - pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W3 | - NPORT_DMODE_ECINC | VC2_PROTOCOL); + pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | + NPORT_DMODE_W3 | NPORT_DMODE_ECINC | VC2_PROTOCOL); pNewportRegs-set.dcbdata0.all = (vc2Ireg 24) | (val 8); } unsigned short NewportVc2Get(NewportRegsPtr pNewportRegs, unsigned char vc2Ireg) { - pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W1 | - NPORT_DMODE_ECINC | VC2_PROTOCOL); + pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | + NPORT_DMODE_W1 | NPORT_DMODE_ECINC | VC2_PROTOCOL); pNewportRegs-set.dcbdata0.bytes.b3 = vc2Ireg; - pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_IREG | NPORT_DMODE_W2 | - NPORT_DMODE_ECINC | VC2_PROTOCOL); + pNewportRegs-set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_IREG | + NPORT_DMODE_W2 | NPORT_DMODE_ECINC | VC2_PROTOCOL); return pNewportRegs-set.dcbdata0.hwords.s1; } @@ -106,7 +106,7 @@ while(1) { NewportBfwait( pNewportRegs); pNewportRegs-set.dcbmode = (xmapChip | R_DCB_XMAP9_PROTOCOL | - XM9_CRS_FIFO_AVAIL | NPORT_DMODE_W1); + XM9_CRS_FIFO_AVAIL | NPORT_DMODE_W1); if( (pNewportRegs-set.dcbdata0.bytes.b3) 7 )
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/modes
Module Name:xsrc Committed By: snj Date: Mon Sep 28 01:51:15 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes [netbsd-5]: xf86Cursors.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1031): external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c: revision 1.2 check that dixLookupPrivate() returned non-NULL before dereferencing it. fixes a SEGV when starting ioquake3 on an X server started with the -dpi 100 -depth 16 flags, as reported by w...@. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.1 Thu Sep 17 03:35:12 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c Mon Sep 28 01:51:15 2009 @@ -612,7 +612,7 @@ cursor_screen_priv = dixLookupPrivate(screen-devPrivates, xf86CursorScreenKey); /* return if HW cursor is inactive, to avoid displaying two cursors */ -if (!cursor_screen_priv-isUp) +if (!cursor_screen_priv || !cursor_screen_priv-isUp) return; scrn = xf86Screens[screen-myNum];
CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: snj Date: Sat Sep 26 05:22:07 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: globals.c xsrc/external/mit/xorg-server/dist/os [netbsd-5]: utils.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1018): external/mit/xorg-server/dist/dix/globals.c: revision 1.2 external/mit/xorg-server/dist/os/utils.c: revision 1.2 By default, use the old X server background and cursor mode (option -retro). Add a -noretro option to get the new (black background and no cursor) behavior. Addresses part of PR xsrc/41870 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/dix/globals.c cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \ xsrc/external/mit/xorg-server/dist/os/utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/dix/globals.c diff -u xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.1 Thu Sep 17 03:34:54 2009 +++ xsrc/external/mit/xorg-server/dist/dix/globals.c Sat Sep 26 05:22:07 2009 @@ -139,7 +139,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in every compilation of dix code */ CursorPtr rootCursor; -Bool party_like_its_1989 = FALSE; +Bool party_like_its_1989 = TRUE; Bool whiteRoot = FALSE; int cursorScreenDevPriv[MAXSCREENS]; Index: xsrc/external/mit/xorg-server/dist/os/utils.c diff -u xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.2 --- xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.1 Thu Sep 17 03:35:47 2009 +++ xsrc/external/mit/xorg-server/dist/os/utils.c Sat Sep 26 05:22:07 2009 @@ -525,6 +525,7 @@ ErrorF(-render [default|mono|gray|color] set render color alloc policy\n); #endif ErrorF(-retro start with classic stipple and cursor\n); +ErrorF(-noretro start with black background and no cursor\n); ErrorF(-s # screen-saver timeout (minutes)\n); ErrorF(-t # mouse threshold (pixels)\n); ErrorF(-terminate terminate at server reset\n); @@ -821,6 +822,8 @@ defaultKeyboardControl.autoRepeat = FALSE; else if ( strcmp( argv[i], -retro) == 0) party_like_its_1989 = TRUE; + else if ( strcmp( argv[i], -noretro) == 0) + party_like_its_1989 = FALSE; else if ( strcmp( argv[i], -s) == 0) { if(++i argc)
CVS commit: [netbsd-5] xsrc
Module Name:xsrc Committed By: bouyer Date: Fri Sep 11 23:00:48 UTC 2009 Modified Files: xsrc/external/mit/expat/dist/lib [netbsd-5]: xmltok_impl.c xsrc/xfree/xc/extras/expat/lib [netbsd-5]: xmltok_impl.c Log Message: Pull up following revision(s) (requested by snj in ticket #951): external/mit/expat/dist/lib/xmltok_impl.c: revision 1.2 xfree/xc/extras/expat/lib/xmltok_impl.c: revision 1.2 Apply revisions 1.14 and 1.15 from expat CVS to fix SA36425. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/expat/dist/lib/xmltok_impl.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.20.1 \ xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/expat/dist/lib/xmltok_impl.c diff -u xsrc/external/mit/expat/dist/lib/xmltok_impl.c:1.1.1.1 xsrc/external/mit/expat/dist/lib/xmltok_impl.c:1.1.1.1.2.1 --- xsrc/external/mit/expat/dist/lib/xmltok_impl.c:1.1.1.1 Tue Jul 29 05:35:07 2008 +++ xsrc/external/mit/expat/dist/lib/xmltok_impl.c Fri Sep 11 23:00:48 2009 @@ -1744,7 +1744,7 @@ const char *end, POSITION *pos) { - while (ptr != end) { + while (ptr end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \ Index: xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c diff -u xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c:1.1.1.2 xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c:1.1.1.2.20.1 --- xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c:1.1.1.2 Fri Mar 5 14:26:09 2004 +++ xsrc/xfree/xc/extras/expat/lib/xmltok_impl.c Fri Sep 11 23:00:48 2009 @@ -1741,7 +1741,7 @@ const char *end, POSITION *pos) { - while (ptr != end) { + while (ptr end) { switch (BYTE_TYPE(enc, ptr)) { #define LEAD_CASE(n) \ case BT_LEAD ## n: \
CVS commit: [netbsd-5] xsrc/external/mit/freetype/dist/src
Module Name:xsrc Committed By: snj Date: Thu Jul 2 05:08:10 UTC 2009 Modified Files: xsrc/external/mit/freetype/dist/src/cff [netbsd-5]: cffload.c xsrc/external/mit/freetype/dist/src/lzw [netbsd-5]: ftzopen.c xsrc/external/mit/freetype/dist/src/sfnt [netbsd-5]: ttcmap.c xsrc/external/mit/freetype/dist/src/smooth [netbsd-5]: ftsmooth.c Log Message: Pull up following revision(s) (requested by mrg in ticket #848): external/mit/freetype/dist/src/cff/cffload.c: revision 1.2 external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.2 external/mit/freetype/dist/src/sfnt/ttcmap.c: revision 1.2 external/mit/freetype/dist/src/smooth/ftsmooth.c: revision 1.2 apply fixes from CVE-2009-0946 To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/freetype/dist/src/cff/cffload.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \ xsrc/external/mit/freetype/dist/src/smooth/ftsmooth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/freetype/dist/src/cff/cffload.c diff -u xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1.2.1 --- xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1 Wed Jul 30 02:36:07 2008 +++ xsrc/external/mit/freetype/dist/src/cff/cffload.c Thu Jul 2 05:08:09 2009 @@ -841,7 +841,20 @@ goto Exit; for ( j = 1; j num_glyphs; j++ ) -charset-sids[j] = FT_GET_USHORT(); + { +FT_UShort sid = FT_GET_USHORT(); + + +/* this constant is given in the CFF specification */ +if ( sid 65000 ) + charset-sids[j] = sid; +else +{ + FT_ERROR(( cff_charset_load: + invalid SID value %d set to zero\n, sid )); + charset-sids[j] = 0; +} + } FT_FRAME_EXIT(); } @@ -874,6 +887,20 @@ goto Exit; } +/* check whether the range contains at least one valid glyph; */ +/* the constant is given in the CFF specification */ +if ( glyph_sid = 65000 ) { + FT_ERROR(( cff_charset_load: invalid SID range\n )); + error = CFF_Err_Invalid_File_Format; + goto Exit; +} + +/* try to rescue some of the SIDs if `nleft' is too large */ +if ( nleft 65000 - 1 || glyph_sid = 65000 - nleft ) { + FT_ERROR(( cff_charset_load: invalid SID range trimmed\n )); + nleft = 65000 - 1 - glyph_sid; +} + /* Fill in the range of sids -- `nleft + 1' glyphs. */ for ( i = 0; j num_glyphs i = nleft; i++, j++, glyph_sid++ ) charset-sids[j] = glyph_sid; Index: xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c diff -u xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1.2.1 --- xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1 Wed Jul 30 02:36:13 2008 +++ xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c Thu Jul 2 05:08:09 2009 @@ -332,6 +332,9 @@ while ( code = 256U ) { +if ( !state-prefix ) + goto Eof; + FTLZW_STACK_PUSH( state-suffix[code - 256] ); code = state-prefix[code - 256]; } Index: xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c diff -u xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1.2.1 --- xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1 Wed Jul 30 02:36:16 2008 +++ xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c Thu Jul 2 05:08:09 2009 @@ -1571,7 +1571,7 @@ FT_INVALID_TOO_SHORT; length = TT_NEXT_ULONG( p ); -if ( table + length valid-limit || length 8208 ) +if ( length (FT_UInt32)( valid-limit - table ) || length 8192 + 16 ) FT_INVALID_TOO_SHORT; is32 = table + 12; @@ -1799,7 +1799,8 @@ p = table + 16; count = TT_NEXT_ULONG( p ); -if ( table + length valid-limit || length 20 + count * 2 ) +if ( length (FT_ULong)( valid-limit - table ) || + length 20 + count * 2 ) FT_INVALID_TOO_SHORT; /* check glyph indices */ @@ -1984,7 +1985,8 @@ p = table + 12; num_groups = TT_NEXT_ULONG( p ); -if ( table + length valid-limit || length 16 + 12 * num_groups ) +if ( length (FT_ULong)( valid-limit - table ) || + length 16 + 12 * num_groups )
CVS commit: [netbsd-5] xsrc/external/mit/libdrm/dist/shared-core
Module Name:xsrc Committed By: snj Date: Tue Apr 7 23:39:33 UTC 2009 Modified Files: xsrc/external/mit/libdrm/dist/shared-core [netbsd-5]: drm.h Log Message: Pull up following revision(s) (requested by rafal in ticket #673): external/mit/libdrm/dist/shared-core/drm.h: revision 1.3 Fix type of DRM_IOCTL_SG_ALLOC ioctl -- it should be input/output instead of just input. Noticed while debugging some scatter/gather fixes from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/external/mit/libdrm/dist/shared-core/drm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libdrm/dist/shared-core/drm.h diff -u xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2 xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2.2.1 --- xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2 Thu Jul 31 01:30:22 2008 +++ xsrc/external/mit/libdrm/dist/shared-core/drm.h Tue Apr 7 23:39:33 2009 @@ -909,7 +909,7 @@ #define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, drm_agp_binding_t) #define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, drm_agp_binding_t) -#define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, drm_scatter_gather_t) +#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, drm_scatter_gather_t) #define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, drm_scatter_gather_t) #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t)
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Wed Apr 1 21:29:14 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #634): external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.7 oops, forgot to initialize the clipping register on init To generate a diff of this commit: cvs rdiff -u -r1.3.2.7 -r1.3.2.8 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.8 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7 Wed Apr 1 03:18:07 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Wed Apr 1 21:29:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.7 2009/04/01 03:18:07 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.8 2009/04/01 21:29:14 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -1934,6 +1934,8 @@ /* Sync */ pXAAInfo-Sync = CrimeSync; + CrimeDisableClipping(pScrn); + /* Screen-to-screen copy */ pXAAInfo-ScreenToScreenCopyFlags = NO_TRANSPARENCY; pXAAInfo-SetupForScreenToScreenCopy = CrimeSetupForScreenToScreenCopy;
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Wed Apr 1 03:01:12 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #629): external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.4 implement clipping, this takes care of line drawing artifacts in pwm To generate a diff of this commit: cvs rdiff -u -r1.3.2.4 -r1.3.2.5 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.4 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.4 Thu Feb 26 07:28:24 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Wed Apr 1 03:01:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.4 2009/02/26 07:28:24 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.5 2009/04/01 03:01:12 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -231,7 +231,8 @@ WRITE4(CRIME_DE_ROP, rop); WRITE4(CRIME_DE_FG, colour 8); WRITE4(CRIME_DE_DRAWMODE, - DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP); + DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP | + DE_DRAWMODE_SCISSOR_EN); WRITE4(CRIME_DE_PRIMITIVE, DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB); WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | @@ -427,7 +428,7 @@ WRITE4(CRIME_DE_FG, color 8); WRITE4(CRIME_DE_DRAWMODE, DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | - DE_DRAWMODE_ROP); + DE_DRAWMODE_ROP | DE_DRAWMODE_SCISSOR_EN); DONE(CRIME_DEBUG_LINES); } @@ -471,12 +472,13 @@ /* transparent */ WRITE4(CRIME_DE_DRAWMODE, DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | - DE_DRAWMODE_ROP | DE_DRAWMODE_LINE_STIP); + DE_DRAWMODE_ROP | DE_DRAWMODE_LINE_STIP | + DE_DRAWMODE_SCISSOR_EN); } else { WRITE4(CRIME_DE_BG, bg 8); WRITE4(CRIME_DE_DRAWMODE, DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | - DE_DRAWMODE_ROP | + DE_DRAWMODE_ROP | DE_DRAWMODE_SCISSOR_EN | DE_DRAWMODE_OPAQUE_STIP | DE_DRAWMODE_LINE_STIP); } /* @@ -521,7 +523,9 @@ CrimePtr fPtr = CRIMEPTR(pScrn); LOG(CRIME_DEBUG_CLIPPING); - /* nothing so far */ + WRITE4(CRIME_DE_SCISSOR, (left 16) | top); + WRITE4(CRIME_DE_SCISSOR + 4, ((right + 1) 16) | (bottom + 1)); + DONE(CRIME_DEBUG_CLIPPING); } @@ -533,7 +537,8 @@ LOG(CRIME_DEBUG_CLIPPING); SYNC; - WRITE4(CRIME_DE_CLIPMODE, 0); + WRITE4(CRIME_DE_SCISSOR, 0); + WRITE4(CRIME_DE_SCISSOR + 4, 0x3fff3fff); DONE(CRIME_DEBUG_CLIPPING); }
CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: snj Date: Wed Apr 1 03:13:54 UTC 2009 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime.h crime_accel.c Log Message: Pull up following revision(s) (requested by macallan in ticket #628): external/mit/xf86-video-crime/dist/src/crime.h: revision 1.3 external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.5 Implement image downloads, now KDE's window minimize animation doesn't leave artifacts anymore. While there, allow commands to queue up where appropriate, this gives a slight speedup in anti-aliased text rendering (about 10% on my 200MHz/1MB O2) and likely in other operations as well. To generate a diff of this commit: cvs rdiff -u -r1.2.2.3 -r1.2.2.4 \ xsrc/external/mit/xf86-video-crime/dist/src/crime.h cvs rdiff -u -r1.3.2.5 -r1.3.2.6 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime.h diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.3 xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.4 --- xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.3 Wed Feb 25 20:32:03 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime.h Wed Apr 1 03:13:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.h,v 1.2.2.3 2009/02/25 20:32:03 snj Exp $ */ +/* $NetBSD: crime.h,v 1.2.2.4 2009/04/01 03:13:54 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -55,6 +55,7 @@ #define CRIME_DEBUG_CLIPPING 0x0020 #define CRIME_DEBUG_SYNC 0x0040 #define CRIME_DEBUG_XRENDER 0x0080 +#define CRIME_DEBUG_IMAGEREAD 0x0100 #define CRIME_DEBUG_ALL 0x #define CRIME_DEBUG_MASK (/*CRIME_DEBUG_IMAGEWRITE*/0) Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.6 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5 Wed Apr 1 03:01:12 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Wed Apr 1 03:13:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.3.2.5 2009/04/01 03:01:12 snj Exp $ */ +/* $NetBSD: crime_accel.c,v 1.3.2.6 2009/04/01 03:13:54 snj Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -59,8 +59,10 @@ } #else #define SYNC do {} while ((*CRIMEREG(0x4000) CRIME_DE_IDLE) == 0) +#define SYNCMTE do {} while ((*CRIMEREG(0x4000) CRIME_DE_MTE_IDLE) == 0) #endif -#define READY do {} while ((*CRIMEREG(0x4000) 0x0e00) != 0x0e00) +#define MAKE_ROOM(x) do {} while ((16 - \ + CRIME_PIPE_LEVEL(*CRIMEREG(0x4000))) x); CARD32 CrimeAlphaTextureFormats[] = {PICT_a8, 0}; CARD32 CrimeTextureFormats[] = {PICT_a8b8g8r8, PICT_a8r8g8b8, 0}; @@ -91,7 +93,7 @@ CrimePtr fPtr = CRIMEPTR(pScrn); LOG(CRIME_DEBUG_BITBLT); - SYNC; + MAKE_ROOM(9); #if 0 if ((rop == GXcopy) (planemask == 0x) (xdir 0)) { /* use the MTE */ @@ -112,7 +114,6 @@ #endif fPtr-use_mte = 0; - SYNC; WRITE4(CRIME_DE_XFER_STEP_X, 1); WRITE4(CRIME_DE_PLANEMASK, planemask); WRITE4(CRIME_DE_ROP, rop); @@ -121,8 +122,11 @@ DE_DRAWMODE_ROP | DE_DRAWMODE_XFER_EN); WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); + WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); fPtr-xdir = xdir; fPtr-ydir = ydir; + SYNC; DONE(CRIME_DEBUG_BITBLT); } @@ -168,11 +172,10 @@ rxd = xDst 2; rxde = ((xDst + w) 2) - 1; oreg = *CRIMEREG(0x4000); - READY; + MAKE_ROOM(4); WRITE4(CRIME_MTE_SRC0, (rxa 16) | rya); WRITE4(CRIME_MTE_SRC1, (rxe 16) | rye); WRITE4(CRIME_MTE_DST0, (rxd 16) | ryd); - WBFLUSH; WRITE4ST(CRIME_MTE_DST1, (rxde 16) | ryde); reg = *CRIMEREG(0x4000); @@ -203,11 +206,10 @@ rys = ySrc; } - READY; + MAKE_ROOM(4); WRITE4(CRIME_DE_PRIMITIVE, prim); WRITE4(CRIME_DE_XFER_ADDR_SRC,(rxs 16) | (rys 0x)); WRITE4(CRIME_DE_X_VERTEX_0, (rxa 16) | (rya 0x)); - WBFLUSH; WRITE4ST(CRIME_DE_X_VERTEX_1, (rxe 16) | (rye 0x)); } DONE(CRIME_DEBUG_BITBLT); @@ -225,8 +227,8 @@ CrimePtr fPtr = CRIMEPTR(pScrn); int i; - SYNC; LOG(CRIME_DEBUG_RECTFILL); + MAKE_ROOM(7); WRITE4(CRIME_DE_PLANEMASK, planemask); WRITE4(CRIME_DE_ROP, rop); WRITE4(CRIME_DE_FG, colour 8); @@ -237,6 +239,9 @@ DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB); WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); + WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32); + SYNC; DONE(CRIME_DEBUG_RECTFILL); } @@