Really fix Ghostscript Coverity issue #3904.

david-pic-changes
Werner Lemberg 16 years ago
parent 4d1a34ce0b
commit b3e6df69e6
  1. 2
      ChangeLog
  2. 4
      src/truetype/ttgxvar.c

@ -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 <wl@gnu.org>

@ -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 )

Loading…
Cancel
Save