ref: b3e6df69e6d112af739f3ad08cb7cafce32683b2
parent: 4d1a34ce0bd6ed5657369fbaba3f243b27ff82a7
author: Werner Lemberg <[email protected]>
date: Sat Mar 21 06:45:18 EDT 2009
Really fix Ghostscript Coverity issue #3904.
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,7 +17,7 @@
Fix Ghostscript Coverity issue #3904.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
- zero value of `runcnt'.
+ invalid values of `runcnt'.
2009-03-20 Werner Lemberg <[email protected]>
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -157,7 +157,7 @@
runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
first = points[i++] = FT_GET_USHORT();
- if ( !runcnt )
+ if ( runcnt < 1 )
goto Exit;
/* first point not included in runcount */
@@ -168,7 +168,7 @@
{
first = points[i++] = FT_GET_BYTE();
- if ( !runcnt )
+ if ( runcnt < 1 )
goto Exit;
for ( j = 0; j < runcnt; ++j )