ref: 3b37bfc4b59597486230ce67e9b75eb7bc0fab7e
parent: 5224aae8bbe558fef4f6174bd83ff0382bb15c1b
author: Peter Klotz <[email protected]>
date: Wed Aug 10 18:38:08 EDT 2016
* src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-10 Peter Klotz <[email protected]>
+
+ * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
+
2016-08-10 Werner Lemberg <[email protected]>
[sfnt] Use correct type for `italicAngle' field (#48732).
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1365,10 +1365,10 @@
/* 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;