diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2020-06-19 08:39:23 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2020-06-19 08:39:23 -0400 |
commit | 6e722f2eaa5840e6b8c6f1eaa6a1fce9d7f90833 (patch) | |
tree | 6bbe25b8e61ac67ebb1e09c0f0785e2136b9bcd8 | |
parent | 8ed5a2477eecf27e645bbb568b66a37eea12973c (diff) | |
download | freetype2-6e722f2eaa5840e6b8c6f1eaa6a1fce9d7f90833.tar.gz |
[base] Rework d1180b5f9598 until further notice.
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large
outlines.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/base/ftoutln.c | 8 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2020-06-19 Alexei Podtelezhnikov <apodtele@gmail.com> + + [base] Rework d1180b5f9598 until further notice. + + * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large + outlines. + 2020-06-19 Sebastian Rasmussen <sebras@gmail.com> [cff, cid] Fix segfaults in case of error (#58621). diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 6009bc314..f449ee68e 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -1060,11 +1060,9 @@ if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) return FT_ORIENTATION_NONE; - /* Reject values larger than 32bit. */ - if ( (unsigned long)cbox.xMin > 0xFFFFFFFFUL || - (unsigned long)cbox.xMax > 0xFFFFFFFFUL || - (unsigned long)cbox.yMin > 0xFFFFFFFFUL || - (unsigned long)cbox.yMax > 0xFFFFFFFFUL ) + /* Reject values large outlines. */ + if ( cbox.xMin < -0x1000000L || cbox.yMin < -0x1000000L || + cbox.xMax > 0x1000000L || cbox.yMax > 0x1000000L ) return FT_ORIENTATION_NONE; xshift = FT_MSB( (FT_UInt32)( FT_ABS( cbox.xMax ) | |