Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 667ed191c41d84d931cc6eab356ffede > files > 6

freetype-2.4.2-7.fc14.src.rpm

--- freetype-2.4.2/src/truetype/ttgxvar.c	2010-07-12 21:03:49.000000000 +0200
+++ freetype-2.4.2/src/truetype/ttgxvar.c	2010-11-15 10:23:12.725915774 +0100
@@ -154,7 +154,7 @@
         runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
         first  = points[i++] = FT_GET_USHORT();
 
-        if ( runcnt < 1 )
+        if ( runcnt < 1 || i + runcnt >= n )
           goto Exit;
 
         /* first point not included in runcount */
@@ -165,7 +165,7 @@
       {
         first = points[i++] = FT_GET_BYTE();
 
-        if ( runcnt < 1 )
+        if ( runcnt < 1 || i + runcnt >= n )
           goto Exit;
 
         for ( j = 0; j < runcnt; ++j )