diff options
author | Anuj Verma <anujv@iitbhilai.ac.in> | 2021-08-02 09:44:16 +0530 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-08-02 06:49:50 +0200 |
commit | be6ab319009c5de7927adb0228412627783499e5 (patch) | |
tree | 068d431c155423f4f1fde9e9d841add9a7e73ec3 | |
parent | ebcc96e559257756478bb93304fbd973857c4c90 (diff) | |
download | freetype2-be6ab319009c5de7927adb0228412627783499e5.tar.gz |
[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.
-rw-r--r-- | src/sdf/ftbsdf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c index db4a2dd11..d837a7956 100644 --- a/src/sdf/ftbsdf.c +++ b/src/sdf/ftbsdf.c @@ -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; |