* src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.

This commit is contained in:
Peter Klotz 2016-08-10 22:38:08 -04:00 committed by Alexei Podtelezhnikov
parent 5224aae8bb
commit 3b37bfc4b5
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2016-08-10 Peter Klotz <Peter.Klotz@ith-icoserve.com>
* src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
2016-08-10 Werner Lemberg <wl@gnu.org>
[sfnt] Use correct type for `italicAngle' field (#48732).

View File

@ -1365,10 +1365,10 @@ typedef ptrdiff_t FT_PtrDist;
/* see whether we can add this span to the current list */
count = ras.num_gray_spans;
span = ras.gray_spans + count - 1;
if ( span->coverage == coverage &&
if ( count > 0 &&
span->coverage == coverage &&
span->x + span->len == x &&
ras.span_y == y &&
count > 0 )
ras.span_y == y )
{
span->len = (unsigned short)( span->len + acount );
return;