diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-09-14 10:26:37 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2021-09-14 10:26:37 -0400 |
commit | 0a8ee851e05589f905f3d205cd84f2556f3584bb (patch) | |
tree | 6e6fb8ade3a897c4e8b18d82251bd2532e7b034d | |
parent | 731d0b68568541954db753a583e4a5d4ca402fab (diff) | |
download | freetype2-0a8ee851e05589f905f3d205cd84f2556f3584bb.tar.gz |
* src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops.
Fixes fallout from 731d0b685685 reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685
-rw-r--r-- | src/pshinter/pshrec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 1177c11e6..1faabdaaf 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -503,9 +503,8 @@ FT_Error error = FT_Err_Ok; - /* the inner loop stops when the unsigned index wraps around */ - /* after reaching 0. */ - for ( index1 = table->num_masks - 1; index1 > 0; index1-- ) + /* the loops stop when unsigned indices wrap around after 0 */ + for ( index1 = table->num_masks - 1; index1 < table->num_masks; index1-- ) { for ( index2 = index1 - 1; index2 < index1; index2-- ) { |