[sdf] Fix out-of-range-access.

* src/sdf/ftbsdf.c (first_pass, second_pass): Fix range during forward pass.
Otherwise the index goes out of range for the last column.

Fixes issue #1077.
This commit is contained in:
Anuj Verma 2021-08-02 09:44:16 +05:30 committed by Werner Lemberg
parent ebcc96e559
commit be6ab31900
1 changed files with 2 additions and 2 deletions

View File

@ -928,7 +928,7 @@
/* Forward pass of rows (left -> right). Leave the first */
/* column, which gets covered in the backward pass. */
for ( i = 1; i < w; i++ )
for ( i = 1; i < w - 1; i++ )
{
index = j * w + i;
current = dm + index;
@ -997,7 +997,7 @@
/* Forward pass of rows (left -> right). Leave the first */
/* column, which gets covered in the backward pass. */
for ( i = 1; i < w; i++ )
for ( i = 1; i < w - 1; i++ )
{
index = j * w + i;
current = dm + index;