[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] 1077-out-of-range-access-in-the-signed-distance-field-implem
From: |
Werner Lemberg |
Subject: |
[freetype2] 1077-out-of-range-access-in-the-signed-distance-field-implementation ceae63c: [sdf] Fix out-of-range-access. |
Date: |
Mon, 2 Aug 2021 00:19:35 -0400 (EDT) |
branch: 1077-out-of-range-access-in-the-signed-distance-field-implementation
commit ceae63cb45b21002f72fb4d12c60288a2084acdd
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
[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.
Reported by @Gajumaru314159. Issue #1077
---
src/sdf/ftbsdf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index db4a2dd..d837a79 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] 1077-out-of-range-access-in-the-signed-distance-field-implementation ceae63c: [sdf] Fix out-of-range-access.,
Werner Lemberg <=