diff --git a/ChangeLog b/ChangeLog index e22d79df8..d04298f57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-08-10 Peter Klotz + + * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access. + 2016-08-10 Werner Lemberg [sfnt] Use correct type for `italicAngle' field (#48732). diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 48d01cd34..f23dbe2d8 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -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;