Fix Savannah bug #31310.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against invalid `runcnt' values.
This commit is contained in:
parent
bc4ed48e41
commit
59eb9f8cfe
|
@ -1,3 +1,10 @@
|
||||||
|
2010-10-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix Savannah bug #31310.
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
|
||||||
|
invalid `runcnt' values.
|
||||||
|
|
||||||
2010-10-08 Chris Liddell <chris.liddell@artifex.com>
|
2010-10-08 Chris Liddell <chris.liddell@artifex.com>
|
||||||
|
|
||||||
Fix Savannah bug #31275.
|
Fix Savannah bug #31275.
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
|
runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
|
||||||
first = points[i++] = FT_GET_USHORT();
|
first = points[i++] = FT_GET_USHORT();
|
||||||
|
|
||||||
if ( runcnt < 1 )
|
if ( runcnt < 1 || i + runcnt >= n )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* first point not included in runcount */
|
/* first point not included in runcount */
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
{
|
{
|
||||||
first = points[i++] = FT_GET_BYTE();
|
first = points[i++] = FT_GET_BYTE();
|
||||||
|
|
||||||
if ( runcnt < 1 )
|
if ( runcnt < 1 || i + runcnt >= n )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
for ( j = 0; j < runcnt; ++j )
|
for ( j = 0; j < runcnt; ++j )
|
||||||
|
|
Loading…
Reference in New Issue