contributing new font package for xorg

Edward G.J. Lee edt1023 at ms17.hinet.net
Fri Aug 12 20:44:20 PDT 2005


On Fri, Aug 12, 2005, Alan Coopersmith wrote:
> Edward G.J. Lee wrote:
> >  And that's why we need legal theory. So I don't think the copyright
> >  holder of [GPLed]font has right to affect the document license
> >  that hold by another people.
> 
> They don't, but they have the right to only allow you to redistribute
> their GPL'ed font if you choose to change the license, just as they
> can't force you to change the license on your software, but can say
> you are only allowed to redistribute it with their GPL'ed software
> embedded if you do so.

  There are three parts will have license issue when we write/publish
  a document,

  1. document context.
  2. display medium. pdf/ps..., Adobe let you can use this format.
  3. fonts. bitmap/ttf/otf....

  there are seperate legal target.

  If you embedded a GPLed TTF in a pdf GFDL document, let's see what
  happen.

  GPLed font only affect the font matter itself, it's nothing to do
  with pdf medium or abstract document context. What GPL can affect
  is the font data in the pdf medium, not document context nor pdf
  itself. They are not derivative work each other. So there are three
  separate license in a pdf document.

  Our GPLed CJK TTF has an exception just like FSF FAQ said,

  ftp://cle.linux.org.tw/pub2/fonts/cwttf/
  ftp://cle.linux.org.tw/pub2/fonts/cwttf/Read322/xc/extras/ogl-sample/main/gfx/include/gl/spec/typemaps/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/spec/typemaps/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/spec/typemaps/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/template
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/template/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/template/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/gl/template/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/glx
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/glx/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/glx/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/include/glx/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glfont
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glfont/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glfont/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glfont/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/include
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/include/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/include/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/include/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/interface
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/interface/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/interface/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/interface/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/internals
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/internals/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/internals/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/internals/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/glu/libnurbs/nurbtess
/home/srv/cvs.freedesktop.org/tmp/cvs-seras/ogl-sample/main/gfx/lib/opengl/glcore/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/glcore/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/glcore/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/include
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/include/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/include/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/opengl/include/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/rgb
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/rgb/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/rgb/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/lib/rgb/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/extensions
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/extensions/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/extensions/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/extensions/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/glx
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/glx/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/glx/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/glx/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/redbook_2ed
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/redbook_2ed/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/redbook_2ed/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/redbook_2ed/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/samples
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/samples/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/samples/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/samples/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/xglinfo
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/xglinfo/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/xglinfo/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/gfx/samples/xglinfo/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/CVS/Entries
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/CVS/Repository
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/include
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/include/CVS
/home/srv/cvs.freedesktop.org/tmp/cvs-serv22322/xc/extras/ogl-sample/main/glx/include/CVS/Entries.freedesktop.org/mailman/listinfo/xorg>,
	<mailto:xorg-request at lists.freedesktop.org?subject=subscribe>
X-List-Received-Date: Sat, 13 Aug 2005 14:59:59 -0000

There are several memory access bugs in fbBltOne() where the code
accesses memory beyond an allocated buffer.  If the end of the buffer
is aligned with a page boundary, and the next page is unmapped or
read-protected, this will invariably lead to a segmentation fault.

The first bug is in fbBltOne(), where under certain circumstances the
code will load bits it doesn't need, and might not even exists.  This
happens when all bits in the source bitmap are needed, but the bitmaps
are "unaligned" such that both startmask and endmask are non-zero.
I'm pretty sure the attached patch fixes this.

The other bugs are in fbBltOne24(), which will virtually always read
beyond the end of a buffer.  Problem here is that the code
unconditionally tries to load the next stipple bits, even if they're
not needed.  The typical pattern is

    while (height--)
    {
        fbInitStipBits(...);
	if (leftmask)
        {
            ...
	    fbNextStipBits(...);
        }
	nl = nlMiddle
        while (nl--)
	{
	    ....
->	    fbNextStipBits(...);
	}
	...
    }

So even if NL == 0, this code reads in the next unit of bits from the
source bitmap.  There is no guarantee that those bits are present.

I have serious problems wrapping my head around this code, and I don't
have any 24bpp hardware to test things on.  But I have several Xorg
coredumps from other OpenBSD users that leave no doubt that this is
happening.  Can someone who is familliar with this code please take a
look at it.  These are serious bugs.

Mark


Index: fbbltone.c
===================================================================
RCS file: /cvs/XF4/xc/programs/Xserver/fb/fbbltone.c,v
retrieving revision 1.2
diff -u -p -r1.2 fbbltone.c
--- fbbltone.c 3 Nov 2004 00:07:51 -0000 1.2
+++ fbbltone.c 13 Aug 2005 14:15:07 -0000
@@ -257,7 +257,7 @@ fbBltOne (FbStip    *src,
 	srcinc++;
     if (endmask)
     {
-	endNeedsLoad = nDst % unitsPerSrc == 0;
+	endNeedsLoad = nmiddle % unitsPerSrc == 0;
 	if (endNeedsLoad)
 	    srcinc++;
     }




More information about the xorg mailing list